:root {
  color-scheme: dark;
  --bg: #07080a;
  --bg-deep: #030406;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.072);
  --surface-hover: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.065);
  --text: rgba(255, 255, 255, 0.94);
  --text-soft: rgba(255, 255, 255, 0.67);
  --text-muted: rgba(255, 255, 255, 0.43);
  --accent: #9cc0ff;
  --accent-soft: rgba(138, 180, 255, 0.13);
  --danger: #ff9f9f;
  --danger-soft: rgba(255, 116, 116, 0.1);
  --radius-lg: 29px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content-width: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg-deep);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(960px 570px at 7% -12%, rgba(98, 131, 255, 0.13), transparent 68%),
    radial-gradient(760px 460px at 96% 88%, rgba(63, 174, 255, 0.07), transparent 70%),
    linear-gradient(180deg, #090a0d 0%, #07080a 55%, #050609 100%);
  color: var(--text);
  font-family: Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

button:disabled,
a[aria-disabled="true"] { cursor: not-allowed; opacity: 0.56; }

::selection { background: rgba(156, 192, 255, 0.27); color: #fff; }

.site-shell {
  width: min(100%, var(--content-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: 27px clamp(20px, 4vw, 56px) 32px;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.92);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.07em;
}

.brand-name {
  color: rgba(255, 255, 255, 0.83);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.site-nav,
.nav-links,
.nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-button,
.quiet-button,
.danger-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 35px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 680;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.nav-button {
  padding: 6px 9px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.nav-button:hover,
.nav-button:focus-visible,
.nav-button.is-active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  outline: none;
}

.nav-dropdown { position: relative; }
.nav-dropdown summary { list-style: none; }
.nav-dropdown summary::-webkit-details-marker { display: none; }

.nav-dropdown-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 9px);
  right: 0;
  min-width: 164px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(29, 31, 37, 0.97), rgba(13, 14, 18, 0.97));
  box-shadow: 0 21px 52px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.nav-dropdown-panel .nav-button {
  justify-content: flex-start;
  min-height: 34px;
  padding: 8px 10px;
  font-size: 11px;
}

.primary-button {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.068));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.21), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.23);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.084));
  box-shadow: 0 14px 31px rgba(0, 0, 0, 0.27), 0 0 30px rgba(129, 172, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  outline: none;
}

.compact-button { width: auto; min-height: 42px; }
.button-arrow { color: var(--text-soft); font-size: 16px; line-height: 1; }

.quiet-button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
}

.quiet-button:hover,
.quiet-button:focus-visible {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}

.small-button { min-height: 31px; padding: 0 9px; font-size: 10px; }

.danger-button {
  min-height: 39px;
  padding: 0 12px;
  border: 1px solid rgba(255, 150, 150, 0.3);
  background: var(--danger-soft);
  color: var(--danger);
}

.danger-button:hover,
.danger-button:focus-visible {
  border-color: rgba(255, 165, 165, 0.55);
  background: rgba(255, 116, 116, 0.16);
  outline: none;
}

.hero { padding: clamp(78px, 10.5vw, 130px) 0 clamp(66px, 9vw, 108px); }
.hero-home { max-width: 900px; }

.eyebrow {
  margin: 0 0 19px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.16em;
}

.hero h1,
.project-intro h1,
.legal-main > h1,
.error-main h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(61px, 9.4vw, 118px);
  font-weight: 740;
  line-height: 0.9;
  letter-spacing: -0.078em;
}

.hero-description {
  max-width: 650px;
  margin: 29px 0 0;
  color: var(--text-soft);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.73;
  letter-spacing: -0.028em;
  word-break: keep-all;
}

.hero-actions,
.inline-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-actions { margin-top: 29px; }

.glass-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.063), rgba(255, 255, 255, 0.028));
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.052);
  backdrop-filter: blur(27px) saturate(132%);
  -webkit-backdrop-filter: blur(27px) saturate(132%);
}

.glass-panel::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(410px 170px at 0 0, rgba(255, 255, 255, 0.04), transparent 72%);
  content: "";
  pointer-events: none;
}

.glass-panel > * { position: relative; }

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

.service-panel {
  min-height: 338px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(23px, 3.2vw, 34px);
}

.panel-topline,
.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-index {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
}

.panel-label {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.service-panel h2,
.upload-panel h2 {
  margin: 0;
  font-size: clamp(27px, 3vw, 37px);
  font-weight: 670;
  line-height: 1.11;
  letter-spacing: -0.055em;
}

.service-panel p,
.upload-panel-intro p,
.upload-guest-copy {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.66;
  letter-spacing: -0.016em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: rgba(255, 255, 255, 0.83);
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible { color: var(--accent); outline: none; }

.upload-panel { margin-top: 16px; padding: clamp(24px, 4vw, 38px); }
.upload-panel-intro { max-width: 540px; }
.upload-panel-intro .eyebrow { margin-bottom: 12px; }
.upload-guest-copy { margin-top: 26px; }
.inline-actions { margin-top: 17px; }

.upload-form { margin-top: 27px; }
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.file-drop {
  min-height: 156px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.19);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.file-drop:hover,
.file-drop:focus-within {
  border-color: rgba(156, 192, 255, 0.48);
  background: rgba(156, 192, 255, 0.045);
}

.file-drop-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 22px;
  font-weight: 300;
}

.file-drop-main { color: var(--text); font-size: 14px; font-weight: 670; }
.file-drop-sub { margin-top: 6px; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.file-drop-sub.has-file { color: var(--accent); }

.upload-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 11px;
}

.upload-action-row .form-message { margin: 0; }
.file-list-wrap { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.section-heading-row h3,
.section-heading-row h2 { margin: 0; font-size: 14px; font-weight: 680; letter-spacing: -0.02em; }

.file-list,
.comment-list { padding: 0; margin: 14px 0 0; list-style: none; }

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line-soft);
}

.file-list > :first-child { border-top: 0; }
.file-detail { min-width: 0; display: grid; gap: 4px; }
.file-detail strong { overflow: hidden; color: var(--text-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.file-detail span { color: var(--text-muted); font-size: 10px; }
.file-actions { display: inline-flex; flex: 0 0 auto; gap: 3px; }
.destructive-link { color: var(--danger); }
.file-list-state { padding: 14px 0; color: var(--text-muted); font-size: 12px; }

.form-stack { display: flex; flex-direction: column; gap: 13px; margin-top: 27px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-stack label,
.withdraw-card label,
.comment-form label { display: grid; gap: 8px; color: var(--text-soft); font-size: 11px; font-weight: 650; }

.form-stack input,
.form-stack select,
.form-stack textarea,
.withdraw-card input,
.comment-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(4, 5, 7, 0.48);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus,
.withdraw-card input:focus,
.comment-form textarea:focus {
  border-color: rgba(156, 192, 255, 0.58);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 0 3px rgba(156, 192, 255, 0.1);
}

.form-stack input[readonly] { color: var(--text-muted); cursor: default; }
.form-stack small { color: var(--text-muted); font-size: 10px; font-weight: 520; }
.consent-field { grid-template-columns: auto 1fr; align-items: start; gap: 9px !important; line-height: 1.55; }
.consent-field input { width: 16px; min-height: 16px; margin: 1px 0 0; accent-color: var(--accent); }

.form-message { min-height: 20px; margin: 14px 0 0; color: var(--accent); font-size: 12px; line-height: 1.5; }
.is-error { color: var(--danger) !important; }

.auth-shell { max-width: 850px; }
.auth-main,
.account-main { min-height: calc(100vh - 179px); display: grid; place-items: center; padding: 70px 0; }

.auth-card {
  width: min(100%, 510px);
  padding: clamp(27px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.027));
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.048);
  backdrop-filter: blur(26px) saturate(135%);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
}

.auth-card-wide { width: min(100%, 630px); }
.auth-card h1 { margin: 0; font-size: clamp(43px, 7vw, 66px); font-weight: 720; letter-spacing: -0.072em; line-height: 0.95; }
.auth-card > p:not(.eyebrow):not(.form-message):not(.auth-switch):not(.account-id):not(.account-role) { margin: 18px 0 0; color: var(--text-soft); font-size: 14px; line-height: 1.68; }
.auth-switch { margin: 17px 0 0; color: var(--text-muted); font-size: 12px; }
.auth-switch a,
.comment-login-notice a { color: var(--accent); }
.auth-passkey-divider { display: flex; align-items: center; gap: 10px; margin: 17px 0 11px; color: var(--text-muted); font-size: 10px; }
.auth-passkey-divider span { flex: 1; height: 1px; background: var(--line-soft); }
.auth-passkey-divider i { font-style: normal; }
.auth-passkey-button { width: 100%; min-height: 44px; border-color: var(--line-soft); }

.account-card { width: min(100%, 570px); }
.account-id { margin: 12px 0 0; color: var(--text-muted); font-size: 13px; }
.account-role {
  display: inline-flex;
  margin: 15px 0 0;
  padding: 6px 9px;
  border: 1px solid rgba(156, 192, 255, 0.19);
  border-radius: 999px;
  background: rgba(156, 192, 255, 0.07);
  color: var(--accent);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.13em;
}

.account-profile { margin-top: 29px; }
.account-admin-note,
.danger-zone {
  margin-top: 30px;
  padding-top: 23px;
  border-top: 1px solid var(--line-soft);
}

.account-admin-note h2,
.danger-zone h2 { margin: 0; font-size: 15px; }
.account-admin-note p,
.danger-zone p { margin: 9px 0 15px; color: var(--text-soft); font-size: 12px; line-height: 1.62; }
.danger-zone { border-top-color: rgba(255, 150, 150, 0.13); }

.withdraw-dialog {
  width: min(calc(100% - 32px), 470px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #111217;
  color: var(--text);
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.62);
}

.withdraw-dialog::backdrop { background: rgba(0, 0, 0, 0.68); backdrop-filter: blur(5px); }
.withdraw-card { display: grid; gap: 13px; padding: 29px; }
.withdraw-card .eyebrow { margin-bottom: 0; }
.withdraw-card h2 { margin: 0; font-size: 27px; letter-spacing: -0.05em; }
.withdraw-card > p:not(.eyebrow):not(.form-message) { margin: 0 0 5px; color: var(--text-soft); font-size: 13px; line-height: 1.6; }
.dialog-actions { justify-content: flex-end; margin-top: 5px; }

.projects-page { overflow: hidden; background: #06070a; }
.projects-shell { width: 100%; max-width: none; height: 100dvh; margin: 0; padding: 0; overflow: hidden; }
.projects-shell .site-header,
.projects-shell .site-footer { position: absolute; z-index: 5; left: clamp(20px, 4vw, 56px); right: clamp(20px, 4vw, 56px); }
.projects-shell .site-header { top: 0; padding: 27px 0 21px; border-bottom-color: rgba(255, 255, 255, 0.1); background: linear-gradient(180deg, rgba(3, 4, 7, 0.43), transparent); }
.projects-shell .site-footer { bottom: 0; margin: 0; padding: 0 0 24px; pointer-events: none; }
.projects-main { min-height: 0; flex: 1; padding: 0; }
.project-rail { position: relative; width: 100%; height: 100dvh; overflow: hidden; overscroll-behavior: contain; }
.project-card {
  --project-accent: #6682af;
  position: absolute;
  z-index: 0;
  inset: 0;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(118px, 14vh, 164px) clamp(20px, 8vw, 144px) clamp(75px, 11vh, 122px);
  background:
    radial-gradient(720px 520px at 85% 14%, color-mix(in srgb, var(--project-accent) 38%, transparent), transparent 70%),
    linear-gradient(145deg, #10131b, #07080c);
  background-size: cover;
  background-position: center 56%;
  clip-path: inset(0 round 0);
  opacity: 0;
  pointer-events: none;
  transform: translateY(15%) scale(1.035);
  transition: opacity 720ms ease, transform 1050ms cubic-bezier(.18,.84,.2,1), clip-path 1050ms cubic-bezier(.18,.84,.2,1), background-position 1100ms cubic-bezier(.18,.84,.2,1), filter 900ms ease;
}
.project-card[data-tone="violet"] { --project-accent: #9474b8; }
.project-card[data-tone="aqua"] { --project-accent: #578f9d; }
.project-card[data-tone="rose"] { --project-accent: #aa6f8d; }
.project-card::before,
.project-card::after { position: absolute; content: ""; pointer-events: none; }
.project-card::before {
  z-index: 0;
  width: min(68vw, 940px);
  aspect-ratio: 1.14;
  top: -25%;
  right: -15%;
  border: 1px solid color-mix(in srgb, var(--project-accent) 48%, transparent);
  border-radius: 44% 56% 63% 37% / 42% 38% 62% 58%;
  background: radial-gradient(circle at 35% 33%, color-mix(in srgb, var(--project-accent) 48%, transparent), transparent 58%);
  filter: blur(12px);
  opacity: 0.76;
  transform: translateY(38%) scale(1.17) rotate(-9deg);
  transition: transform 1100ms cubic-bezier(.18,.84,.2,1), border-radius 1100ms cubic-bezier(.18,.84,.2,1), opacity 800ms ease;
}
.project-card::after { inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(3, 4, 7, 0.68), rgba(3, 4, 7, 0.18) 62%, rgba(3, 4, 7, 0.44)), linear-gradient(0deg, rgba(2, 3, 6, 0.49), transparent 54%); }
.project-card[data-side="right"]::before { top: auto; right: auto; bottom: -28%; left: -15%; transform: translateY(-38%) scale(1.17) rotate(9deg); }
.project-card.is-active::before { border-radius: 57% 43% 38% 62% / 58% 62% 38% 42%; opacity: 0.96; transform: translateY(0) scale(1) rotate(0); }
.project-card[data-side="right"].is-active::before { transform: translateY(0) scale(1) rotate(0); }
.project-card.is-before { z-index: 1; transform: translateY(-15%) scale(1.035); clip-path: inset(0 0 26% round 0 0 26% 26%); filter: saturate(.84) brightness(.72); }
.project-card.is-after { z-index: 1; transform: translateY(15%) scale(1.035); clip-path: inset(26% 0 0 round 26% 26% 0 0); filter: saturate(.84) brightness(.72); }
.project-card.is-active { z-index: 2; opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); clip-path: inset(0 round 0); background-position: center; filter: none; }
.project-card-content { position: relative; z-index: 1; width: min(100%, 1110px); display: grid; gap: clamp(22px, 4vh, 47px); opacity: 0; transform: translateX(-13vw); transition: opacity 520ms ease 150ms, transform 840ms cubic-bezier(.18,.84,.2,1) 120ms; }
.project-card[data-side="right"] .project-card-content { margin-left: auto; transform: translateX(13vw); }
.project-card.is-active .project-card-content { opacity: 1; transform: translateX(0); }
.project-card-index { margin: 0; color: rgba(255, 255, 255, 0.56); font-size: 10px; font-weight: 740; letter-spacing: 0.16em; }
.project-card-heading-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 270px); align-items: start; gap: clamp(20px, 4vw, 72px); }
.project-card-title-block { display: grid; justify-items: start; gap: clamp(21px, 3vw, 33px); }
.project-card h2 { max-width: 690px; margin: 0; font-size: clamp(54px, 8.8vw, 142px); font-weight: 720; line-height: 0.84; letter-spacing: -0.09em; word-break: keep-all; text-wrap: balance; }
.project-card-summary { max-width: 270px; margin: 9px 0 0; color: rgba(255, 255, 255, 0.72); font-size: clamp(12px, 1.1vw, 15px); line-height: 1.72; word-break: keep-all; }
.project-card-link { min-height: 39px; }
.project-card[data-side="right"] .project-card-heading-row { grid-template-columns: minmax(170px, 270px) minmax(0, 1fr); }
.project-card[data-side="right"] .project-card-title-block { grid-column: 2; align-items: end; justify-items: end; }
.project-card[data-side="right"] .project-card-summary { grid-column: 1; grid-row: 1; text-align: right; }
.project-card[data-side="right"] h2 { text-align: right; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.project-card[data-side="right"] .tag-list { justify-content: flex-end; }
.tag-list span { padding: 5px 8px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; background: rgba(0, 0, 0, 0.13); color: rgba(255, 255, 255, 0.65); font-size: 9px; font-weight: 650; }
.project-loading { min-height: 100dvh; display: grid; place-items: center; gap: 13px; padding: 25px; color: var(--text-muted); font-size: 13px; text-align: center; }
.project-loading p { margin: 0; }

.project-detail-shell { max-width: 1180px; position: relative; isolation: isolate; }
.project-detail-shell > :not(.project-detail-background) { position: relative; z-index: 1; }
.project-detail-background { position: fixed; z-index: 0; inset: 0; overflow: hidden; background: #08090d center / cover no-repeat; }
.project-detail-background::after { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 5, 8, .84), rgba(4, 5, 8, .44) 58%, rgba(4, 5, 8, .68)), linear-gradient(0deg, rgba(4, 5, 8, .72), transparent 58%); content: ""; }
.project-detail-main { padding: clamp(44px, 7vw, 88px) 0 40px; }
.back-link { display: inline-flex; margin-bottom: 40px; color: var(--text-muted); font-size: 12px; text-decoration: none; }
.back-link:hover,
.back-link:focus-visible { color: var(--accent); outline: none; }
.project-detail-hero { max-width: 850px; }
.project-detail-hero h1 { margin: 0; font-size: clamp(49px, 8vw, 102px); font-weight: 730; line-height: 0.91; letter-spacing: -0.075em; word-break: keep-all; }
.project-detail-summary { max-width: 670px; margin: 25px 0 0; color: var(--text-soft); font-size: 17px; line-height: 1.72; word-break: keep-all; }
.project-content-section { margin-top: clamp(38px, 6vw, 70px); }
.project-content-frame { width: 100%; min-height: min(72vh, 850px); display: block; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.02); }
.project-content-empty { min-height: 260px; display: grid; place-items: center; padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--text-muted); text-align: center; }
.project-error { max-width: 640px; padding: 34px; }
.project-error h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.06em; }
.project-error p { margin: 17px 0 25px; color: var(--text-soft); line-height: 1.65; }

.comments-section { max-width: 800px; margin-top: clamp(48px, 7vw, 82px); padding-top: 26px; border-top: 1px solid var(--line); }
.comments-section .section-heading-row { align-items: baseline; }
.comments-section h2 { margin: 0; font-size: 21px; letter-spacing: -0.04em; }
.comment-state { min-height: 18px; margin: 0; color: var(--text-muted); font-size: 11px; }
.comment-item { padding: 17px 0; border-top: 1px solid var(--line-soft); }
.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--text-muted); font-size: 10px; }
.comment-meta strong { color: var(--text-soft); font-size: 11px; }
.comment-meta time { margin-left: auto; }
.admin-badge { padding: 3px 6px; border: 1px solid rgba(156, 192, 255, 0.2); border-radius: 999px; color: var(--accent); font-size: 8px; font-weight: 750; }
.comment-body { margin: 8px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.comment-empty { padding: 19px 0; color: var(--text-muted); font-size: 12px; }
.comment-form { margin-top: 23px; padding: 20px; border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.025); }
.comment-form textarea { min-height: 108px; resize: vertical; }
.comment-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; }
.comment-form-footer p { margin: 0; color: var(--text-muted); font-size: 10px; }
.comment-form-footer .primary-button { min-height: 37px; }
.comment-login-notice { margin: 21px 0 0; padding: 15px 0; color: var(--text-muted); font-size: 12px; }
.comment-disabled { margin: 21px 0 0; padding: 14px 15px; border: 1px solid rgba(255, 214, 132, 0.16); border-radius: var(--radius-sm); background: rgba(255, 214, 132, 0.055); color: rgba(255, 226, 168, 0.83); font-size: 12px; line-height: 1.6; }

.about-shell { max-width: 1080px; }
.about-main { padding: clamp(58px, 9vw, 108px) 0 32px; }
.about-intro { padding-bottom: clamp(44px, 7vw, 76px); }
.about-intro h1 { margin: 0; font-size: clamp(56px, 9vw, 100px); font-weight: 730; line-height: 1.1; letter-spacing: -0.075em; }
.about-name { margin: 18px 0 0; color: var(--text-muted); font-size: 12px; letter-spacing: 0.16em; }
.about-lead { max-width: 650px; margin: 24px 0 0; color: var(--text-soft); font-size: 17px; line-height: 1.8; word-break: keep-all; }
.about-intro > .text-link { margin-top: 26px; }
.about-section { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--line-soft); }
.about-section h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.04em; }
.about-copy p { margin: 0 0 16px; color: var(--text-soft); font-size: 14px; line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.about-copy p:last-child { margin-bottom: 0; }
.about-photo { display: block; width: min(100%, 320px); height: auto; margin-top: 24px; border-radius: var(--radius-md); }
.about-records { margin: 0; padding: 0; list-style: none; }
.about-record { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 24px; padding: 24px 0; }
.about-record:first-child { padding-top: 0; }
.about-record:last-child { padding-bottom: 0; }
.about-record + .about-record { border-top: 1px solid var(--line-soft); }
.about-record h3 { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.5; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.about-record p { margin: 9px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.about-record .about-period { margin: 2px 0 0; color: var(--text-muted); font-size: 12px; }
.about-record .about-record-meta { color: var(--text-muted); }
.about-record .text-link { margin-top: 14px; }
.about-empty { color: var(--text-muted); }
@media (max-width: 760px) {
  .about-section { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 570px) {
  .about-record { grid-template-columns: 1fr; gap: 8px; }
}

.legal-shell { max-width: 930px; }
.legal-main { max-width: 790px; padding: clamp(59px, 9vw, 110px) 0 55px; }
.legal-main > h1 { font-size: clamp(50px, 7.5vw, 90px); }
.legal-lead { margin: 28px 0 0; color: var(--text-soft); font-size: 16px; line-height: 1.75; word-break: keep-all; }
.legal-content { display: grid; gap: 0; margin-top: 48px; border-top: 1px solid var(--line); }
.legal-content section { padding: 25px 0; border-bottom: 1px solid var(--line-soft); }
.legal-content h2 { margin: 0; font-size: 18px; letter-spacing: -0.04em; }
.legal-content p { margin: 11px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.75; word-break: keep-all; }
.legal-content ul { display: grid; gap: 8px; margin: 13px 0 0; padding-left: 18px; color: var(--text-soft); font-size: 13px; line-height: 1.7; word-break: keep-all; }
.legal-content a { color: var(--accent); }
.legal-withdraw { margin-top: 38px; padding: 24px 0 0; border-top: 1px solid var(--line); }
.legal-withdraw h2 { margin: 0; font-size: 20px; letter-spacing: -0.045em; }
.legal-withdraw p { margin: 10px 0 16px; color: var(--text-soft); font-size: 13px; line-height: 1.65; }

.error-shell { max-width: 870px; }
.error-main { min-height: calc(100vh - 180px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 65px 0; }
.error-main h1 { font-size: clamp(53px, 9vw, 104px); }
.error-main > p:not(.eyebrow) { max-width: 480px; margin: 25px 0 28px; color: var(--text-soft); font-size: 16px; line-height: 1.7; }

.site-footer { display: flex; justify-content: space-between; gap: 18px; margin-top: auto; padding-top: 43px; color: rgba(255, 255, 255, 0.28); font-size: 8px; font-weight: 690; letter-spacing: 0.14em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

@supports not ((backdrop-filter: blur(1px))) {
  .glass-panel,
  .auth-card,
  .nav-dropdown-panel { background-color: rgba(20, 22, 27, 0.97); }
}

@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .site-nav { justify-content: flex-start; }
  .home-grid { grid-template-columns: 1fr; }
  .auth-main,
  .account-main { min-height: auto; padding: 54px 0; }
  .project-content-frame { min-height: 580px; }
  .projects-shell .site-header { align-items: center; flex-direction: row; }
  .projects-shell .site-nav { justify-content: flex-end; }
  .project-card { padding-inline: clamp(20px, 7vw, 44px); }
  .project-card-heading-row,
  .project-card[data-side="right"] .project-card-heading-row { grid-template-columns: 1fr; gap: 18px; }
  .project-card[data-side="right"] .project-card-title-block,
  .project-card[data-side="right"] .project-card-summary { grid-column: auto; grid-row: auto; }
  .project-card[data-side="right"] .project-card-summary { text-align: right; }
  .project-card h2 { font-size: clamp(52px, 14vw, 88px); }
}

@media (max-width: 570px) {
  .site-shell { padding-top: 20px; padding-bottom: 25px; }
  .site-header { gap: 14px; padding-bottom: 17px; }
  .brand-name { font-size: 10px; }
  .site-nav { gap: 1px; }
  .nav-links,
  .nav-auth { gap: 0; }
  .nav-button { min-height: 29px; padding: 5px 6px; font-size: 9px; }
  .nav-dropdown-panel { right: auto; left: 0; }
  .nav-auth .nav-dropdown-panel { right: 0; left: auto; }
  .hero { padding: 65px 0 60px; }
  .hero h1,
  .project-intro h1,
  .legal-main > h1,
  .error-main h1 { font-size: clamp(54px, 16vw, 80px); }
  .hero-description { margin-top: 23px; font-size: 15px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .compact-button { width: 100%; }
  .home-grid { gap: 12px; }
  .service-panel { min-height: 280px; padding: 22px; border-radius: 23px; }
  .upload-panel { margin-top: 12px; padding: 22px; border-radius: 23px; }
  .inline-actions { align-items: stretch; flex-direction: column; }
  .inline-actions .compact-button { width: 100%; }
  .upload-action-row { align-items: stretch; flex-direction: column; }
  .upload-action-row .compact-button { width: 100%; }
  .file-item { align-items: flex-start; flex-direction: column; gap: 9px; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-card { border-radius: 23px; }
  .projects-shell { padding: 0; }
  .projects-shell .site-header,
  .projects-shell .site-footer { left: 20px; right: 20px; }
  .projects-shell .site-header { padding-top: 18px; }
  .projects-shell .site-footer { padding-bottom: 16px; }
  .projects-shell .site-footer span:nth-child(2) { display: none; }
  .project-card { min-height: 100dvh; padding-top: 105px; padding-bottom: 68px; }
  .project-card-content { gap: 20px; }
  .project-card h2 { font-size: clamp(48px, 15vw, 75px); }
  .project-detail-main { padding-top: 43px; }
  .back-link { margin-bottom: 29px; }
  .project-detail-hero h1 { font-size: clamp(43px, 13vw, 69px); }
  .project-detail-summary { font-size: 15px; }
  .project-content-frame { min-height: 500px; border-radius: 20px; }
  .comment-form-footer { align-items: stretch; flex-direction: column; }
  .comment-form-footer .primary-button { width: 100%; }
  .site-footer { padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
