@font-face {
  font-family: "Anurati";
  src: url("../assets/anurati.otf") format("opentype");
  font-display: block;
}
@font-face {
  font-family: "Quicksand";
  src: url("../assets/quicksand-bold.otf") format("opentype");
  font-weight: 700;
  font-display: block;
}

:root {
  --fg: #f4f4f4;
  --muted: rgba(244, 244, 244, 0.55);
  --faint: rgba(244, 244, 244, 0.18);
  --glass: rgba(10, 10, 10, 0.55);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #c8102e;
  --glow: 0 0 18px rgba(255, 255, 255, 0.35), 0 2px 24px rgba(0, 0, 0, 0.9);
  --pad: clamp(20px, 4.5vw, 72px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--fg);
  font: 700 15px/1.5 "Quicksand", system-ui, sans-serif;
}

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#loader {
  position: fixed; inset: 0; display: grid; place-items: center; z-index: 20;
  background: #000; transition: opacity 1.2s ease; z-index: 40;
  font-family: "Anurati", sans-serif; letter-spacing: .6em; color: var(--muted); font-size: 12px;
}
#loader.done { opacity: 0; pointer-events: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }
svg { fill: currentColor; }

.enter { opacity: 0; transform: translateX(-14px); }
body.entered .enter { animation: enter .9s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes enter { to { opacity: 1; transform: none; } }

#clock {
  position: fixed; top: var(--pad); left: var(--pad); z-index: 4;
  text-shadow: var(--glow); user-select: none;
}
.day {
  font-family: "Anurati", sans-serif;
  font-size: clamp(38px, 6.4vw, 104px);
  line-height: 1;
  letter-spacing: .32em;
  margin-right: -.32em;
}
.time {
  margin-top: clamp(10px, 1.4vw, 22px);
  font-size: clamp(26px, 3vw, 50px);
  letter-spacing: .12em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.time .dash { opacity: .8; }
.time .colon { animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.date {
  margin-top: clamp(8px, .9vw, 14px);
  font-size: clamp(13px, 1.25vw, 20px);
  letter-spacing: .32em;
  color: var(--muted);
}

#menu { position: fixed; left: var(--pad); bottom: var(--pad); z-index: 4; }
#menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(6px, 1vh, 14px); }
#menu button {
  position: relative; display: flex; align-items: baseline; gap: 18px;
  padding: 6px 0 6px 26px; text-align: left;
  color: var(--muted); text-shadow: 0 2px 18px rgba(0,0,0,.9);
  transition: color .25s ease, transform .35s cubic-bezier(.2,.7,.2,1), text-shadow .25s ease;
}
#menu button::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 0; height: 2px; background: var(--fg); box-shadow: 0 0 10px rgba(255,255,255,.8);
  transform: translateY(-50%); transition: width .35s cubic-bezier(.2,.7,.2,1);
}
#menu button::after {
  content: ""; position: absolute; left: 26px; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.7), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
#menu .label {
  font-family: "Anurati", sans-serif; text-transform: uppercase;
  font-size: clamp(18px, 2vw, 30px); letter-spacing: .28em; line-height: 1.1;
}
#menu button:hover, #menu button:focus-visible, #menu button.active {
  color: var(--fg); transform: translateX(10px); text-shadow: var(--glow); outline: none;
}
#menu button:hover::before, #menu button:focus-visible::before, #menu button.active::before { width: 16px; }
#menu button:hover::after, #menu button:focus-visible::after, #menu button.active::after { transform: scaleX(1); }

#corner { transition: opacity .6s; position: fixed; right: var(--pad); bottom: var(--pad); z-index: 7; display: flex; gap: 18px; align-items: center; }
#sound { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .3em; color: var(--muted); transition: color .2s; }
#sound:hover { color: var(--fg); }
.eq { display: flex; gap: 2px; align-items: flex-end; height: 12px; }
.eq i { width: 2px; height: 3px; background: currentColor; transition: height .3s; }
#sound.playing .eq i { animation: eq 1s ease-in-out infinite alternate; }
#sound.playing .eq i:nth-child(2) { animation-delay: -.3s; }
#sound.playing .eq i:nth-child(3) { animation-delay: -.6s; }
#sound.playing .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
#gear { width: 22px; height: 22px; color: var(--muted); transition: color .2s, transform .6s; }
#gear:hover { color: var(--fg); transform: rotate(90deg); }
#gear svg { width: 100%; height: 100%; }
#settings {
  position: fixed; right: var(--pad); bottom: calc(var(--pad) + 40px); z-index: 7;
  width: 220px; padding: 16px 18px; display: grid; gap: 12px; font-size: 13px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
}
#settings[hidden] { display: none; }
#settings h2 { margin: 0; font: 400 11px "Anurati", sans-serif; letter-spacing: .35em; color: var(--muted); }
#settings label { display: grid; gap: 4px; }
#settings label.check { display: flex; gap: 8px; align-items: center; }
#settings select { font: inherit; background: rgba(0,0,0,.5); color: var(--fg); border: 1px solid var(--line); padding: 5px 6px; }
#settings input[type="checkbox"] { accent-color: var(--fg); }

@media (max-width: 760px) {
  #corner { bottom: auto; top: var(--pad); }
  #settings { bottom: auto; top: calc(var(--pad) + 40px); }
  #sound-label { display: none; }
  .day { font-size: clamp(22px, 7.6vw, 38px); }
}

#gate {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(22px) brightness(.8); -webkit-backdrop-filter: blur(22px) brightness(.8);
  transition: opacity 1.1s ease;
}
#gate.leaving { opacity: 0; pointer-events: none; }
#enter {
  font-family: "Anurati", sans-serif; text-transform: uppercase;
  font-size: clamp(18px, 3vw, 40px); letter-spacing: .5em; margin-right: -.5em;
  text-shadow: var(--glow); padding: 24px 32px;
  animation: breathe 2.6s ease-in-out infinite;
}
#enter:hover { animation-play-state: paused; opacity: 1; }
@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
body:not(.entered) #clock, body:not(.entered) #menu, body:not(.entered) #corner { opacity: 0; pointer-events: none; }

#view {
  position: fixed; inset: 0; z-index: 10; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y;
  padding: var(--pad);
  animation: fade .45s ease;
}
body.in-view::after {
  content: ""; position: fixed; inset: 0; z-index: 9; pointer-events: none;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(28px) saturate(80%); -webkit-backdrop-filter: blur(28px) saturate(80%);
  animation: fade .45s ease;
}
#view[hidden], #detail[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
#clock, #menu { transition: opacity .3s; }
body.in-view #clock, body.in-view #menu { opacity: 0; pointer-events: none; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 5vh, 56px); }
#view-title {
  margin: 0; font: 400 clamp(24px, 4.6vw, 72px)/1 "Anurati", sans-serif;
  letter-spacing: .3em; text-transform: uppercase; text-shadow: var(--glow);
  animation: slide .6s cubic-bezier(.2,.7,.2,1);
}
.back { font-size: 12px; letter-spacing: .35em; color: var(--muted); transition: color .2s, transform .3s; white-space: nowrap; }
.back:hover { color: var(--fg); transform: translateX(-4px); }
@keyframes slide { from { opacity: 0; transform: translateX(-20px); } }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(16px, 2vw, 28px); }
.card {
  display: flex; flex-direction: column; text-align: left; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .35s, background .25s;
  opacity: 0; animation: rise .55s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.card:hover, .card:focus-visible {
  transform: translateY(-6px); border-color: rgba(255,255,255,.45); outline: none;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03));
  box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 30px rgba(255,255,255,.07);
}
.thumb { aspect-ratio: 16 / 9; width: 100%; background: rgba(0,0,0,.35) center / cover no-repeat; display: grid; place-items: center; position: relative; overflow: hidden; }
.mono { font-family: "Anurati", sans-serif; letter-spacing: .2em; margin-right: -.2em; color: rgba(255,255,255,.22); transition: color .3s, transform .5s; }
.thumb .mono { font-size: 44px; }
.card:hover .thumb .mono { color: rgba(255,255,255,.55); transform: scale(1.06); }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.45)); }
.card-body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.card .sub { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); margin: 0; }
.card h3 { margin: 0; font-size: 19px; letter-spacing: .04em; }
.card .sum { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.card .tags { margin-top: 6px; }
.git-badge { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.git-badge svg { width: 13px; height: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--line); color: var(--muted); }
.empty { color: var(--muted); letter-spacing: .1em; }

#detail {
  position: fixed; inset: 0; z-index: 12; display: grid; place-items: center;
  padding: var(--pad); animation: fade .3s ease; isolation: isolate;
}
#detail::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.window, .dc-window, .info, .commits { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
.window {
  position: relative; width: min(1180px, 100%); max-height: calc(100vh - 2 * var(--pad));
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  background: rgba(12, 12, 12, .94); border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 30px 90px rgba(0,0,0,.7);
  animation: pop .45s cubic-bezier(.2,.7,.2,1);
  overflow: hidden;
}
.window.no-git { grid-template-columns: 1fr; width: min(760px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.window .close { position: absolute; top: 12px; right: 16px; z-index: 2; font-size: 26px; line-height: 1; opacity: .6; transition: opacity .2s; }
.window .close:hover { opacity: 1; }
.info { padding: clamp(20px, 3vw, 40px); overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.info::-webkit-scrollbar, .commits::-webkit-scrollbar { width: 6px; }
.info::-webkit-scrollbar-thumb, .commits::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }
.info, .commits { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.media { aspect-ratio: 16 / 9; background: rgba(0,0,0,.4) center / cover no-repeat; margin-bottom: 22px; display: grid; place-items: center; border: 1px solid var(--line); }
.media .mono { font-size: 64px; }
.info .sub { margin: 0 0 6px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.info h3 { margin: 0 0 14px; font: 400 clamp(22px, 2.6vw, 34px)/1.15 "Anurati", sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.desc { margin-top: 18px; color: rgba(244,244,244,.82); line-height: 1.7; font-size: 14.5px; }
.desc p { margin: 0 0 12px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.links a {
  color: var(--fg); text-decoration: none; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  padding: 9px 14px; border: 1px solid rgba(255,255,255,.3); transition: background .2s, border-color .2s;
}
.links a:hover { background: rgba(255,255,255,.1); border-color: var(--fg); }

.git { border-left: 1px solid var(--line); background: rgba(0,0,0,.3); display: flex; flex-direction: column; min-height: 0; }
.git[hidden] { display: none; }
.git > header { display: flex; gap: 12px; align-items: center; padding: 22px 56px 14px 24px; border-bottom: 1px solid var(--line); }
.git > header svg { width: 22px; height: 22px; flex: none; }
.git > header div { display: grid; min-width: 0; }
.git-label { font-size: 10.5px; letter-spacing: .3em; color: var(--muted); }
#git-repo { color: var(--fg); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#git-repo:hover { text-decoration: underline; }
.git-stats { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 24px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.git-stats:empty { display: none; }
.commits { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; flex: 1; min-height: 0; }
.commits li a {
  display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; padding: 12px 24px;
  color: inherit; text-decoration: none; border-left: 2px solid transparent; transition: background .2s, border-color .2s;
  animation: rise .4s cubic-bezier(.2,.7,.2,1) backwards;
}
.commits li a:hover { background: rgba(255,255,255,.05); border-left-color: var(--fg); }
.commits .ava { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.1); }
.commits .msg { font-size: 13.5px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.commits .meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.commits code { font: 11px ui-monospace, Consolas, monospace; color: var(--fg); opacity: .7; }
.commits .note { padding: 16px 24px; color: var(--muted); font-size: 13px; }
.skeleton { height: 46px; margin: 8px 24px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 860px) {
  .window { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: auto; overflow-y: auto; }
  .info { overflow: visible; min-height: auto; }
  .git { border-left: 0; border-top: 1px solid var(--line); }
  .commits { overflow: visible; }
}

.window[hidden], .dc-window[hidden] { display: none; }

.dc-card { --dc-top: #2b2d31; --dc-bottom: #1e1f22; --dc-accent: #5865f2; padding: 0; }
.dc-card-inner {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  background: linear-gradient(180deg, var(--dc-top), var(--dc-bottom));
  transition: background .4s;
}
.dc-head { position: relative; }
.dc-card .dc-banner { aspect-ratio: 5 / 2; }
.dc-banner { width: 100%; background: var(--dc-accent) center / cover no-repeat; }
.dc-ava-wrap {
  position: absolute; left: 16px; bottom: 0; transform: translateY(50%);
  border-radius: 50%; padding: 5px; background: var(--dc-top);
}
.dc-ava { display: block; width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.08); object-fit: cover; }
.dc-card .card-body { padding-top: 46px; }
.dc-card h3 { font-size: 20px; }
.dc-card .sub { text-transform: none; letter-spacing: .02em; font-size: 13px; color: rgba(255,255,255,.75); }
.dc-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.dc-badges:empty { display: none; }
.dc-badge { width: 22px; height: 22px; }
.dc-card .dc-badges { padding: 4px 6px; background: rgba(0,0,0,.25); border-radius: 8px; width: max-content; margin: 2px 0; }
.dc-sum { color: rgba(255,255,255,.88) !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dc-emoji { width: 1.375em; height: 1.375em; vertical-align: -.35em; object-fit: contain; margin: 0 .05em; }
.dc-card:hover .dc-card-inner, .dc-card:focus-visible .dc-card-inner { filter: brightness(1.08); }

.dc-window {
  --dc-top: #2b2d31; --dc-bottom: #1e1f22; --dc-accent: #5865f2;
  position: relative; width: min(440px, 100%); max-height: calc(100vh - 2 * var(--pad)); overflow-y: auto;
  background: linear-gradient(180deg, var(--dc-top), var(--dc-bottom));
  border: 2px solid color-mix(in srgb, var(--dc-accent) 55%, transparent);
  border-radius: 12px; box-shadow: 0 30px 90px rgba(0,0,0,.7);
  animation: pop .45s cubic-bezier(.2,.7,.2,1);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
}
.dc-window .dc-banner { aspect-ratio: 17 / 6; }
.dc-window .dc-ava-wrap { position: relative; left: auto; bottom: auto; transform: none; margin: -66px 0 0 16px; width: max-content; padding: 6px; }
.dc-window .dc-ava { width: 120px; height: 120px; }
.dc-window .close {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.55); font-size: 22px; line-height: 1; opacity: .85; display: grid; place-items: center;
}
.dc-window .close:hover { opacity: 1; background: rgba(0,0,0,.75); }
.dc-body { padding: 10px 20px 22px; display: grid; gap: 10px; font-family: system-ui, "Segoe UI", sans-serif; font-weight: 400; }
#dc-name { margin: 0; font: 700 26px/1.2 system-ui, "Segoe UI", sans-serif; letter-spacing: 0; }
.dc-handle { margin: -6px 0 0; font-size: 15px; color: rgba(255,255,255,.85); }
.dc-window .dc-badges { padding: 6px 8px; background: rgba(0,0,0,.25); border-radius: 8px; width: max-content; }
.dc-window .dc-badge { width: 24px; height: 24px; }
.dc-bio { font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.92); margin-top: 6px; overflow-wrap: anywhere; }
.dc-since { display: grid; gap: 4px; font-size: 15px; margin-top: 6px; }
.dc-since:empty { display: none; }
.dc-label { font-size: 13px; font-weight: 700; }
.dc-link {
  margin-top: 10px; text-align: center; padding: 11px; border-radius: 8px;
  background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-weight: 600; transition: background .2s;
}
.dc-link:hover { background: rgba(255,255,255,.2); }

.stats { margin-top: clamp(22px, 3.2vh, 40px); display: grid; gap: 10px; animation: enter .9s cubic-bezier(.2,.7,.2,1) both; }
.stats[hidden] { display: none; }
.stat-row { display: flex; gap: clamp(20px, 2.6vw, 40px); padding-bottom: 12px; border-bottom: 1px solid var(--faint); width: max-content; max-width: 100%; }
.stat { display: grid; gap: 2px; }
.stat[hidden] { display: none; }
.stat .num { font-size: clamp(22px, 2.2vw, 34px); line-height: 1; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.stats .lbl { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.stat-repo {
  display: flex; align-items: baseline; gap: 12px; color: var(--fg); text-decoration: none; width: max-content; max-width: 100%;
  text-shadow: 0 2px 18px rgba(0,0,0,.9); transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.stat-repo[hidden] { display: none; }
.stat-repo .lbl { min-width: 9.5em; }
.stat-repo .name { font-size: 15px; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-repo .star { font-size: 12px; color: var(--muted); white-space: nowrap; }
.stat-repo:hover { transform: translateX(6px); }
.stat-repo:hover .name { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 760px) {
  .stat-repo { display: none !important; }
  .stat-row { border-bottom: 0; padding-bottom: 0; }
  .stat .num { font-size: 20px; }
}
@media (max-height: 820px) and (min-width: 761px) {
  .day { font-size: min(6.4vw, 10.5vh); }
  .time { margin-top: 1.4vh; font-size: min(3vw, 5.2vh); }
  .date { margin-top: 1vh; }
  .stats { margin-top: 2.6vh; gap: 6px; }
  .stat-row { padding-bottom: 8px; }
  .stat .num { font-size: min(2.2vw, 4vh); }
  .stat-repo .name { font-size: 14px; }
  #menu .label { font-size: min(2vw, 4vh); }
  #menu ul { gap: .4vh; }
  #menu button { padding: 4px 0 4px 26px; }
}

.media[hidden] { display: none; }
.thumb.logo, .media.logo { background-size: contain; background-origin: content-box; padding: 18%; background-color: rgba(255,255,255,.03); }
.window.reading { width: min(820px, 100%); grid-template-columns: 1fr; }
.window.reading .info { padding: clamp(24px, 4vw, 56px) clamp(22px, 5vw, 64px); }
.window.reading .desc { font-size: 16px; line-height: 1.8; max-width: 66ch; }
.desc h4 { margin: 26px 0 8px; font: 700 18px/1.3 "Quicksand", sans-serif; letter-spacing: .04em; color: var(--fg); }
.desc ul { margin: 0 0 14px; padding-left: 20px; }
.desc li { margin: 4px 0; }
.desc blockquote { margin: 0 0 14px; padding: 4px 0 4px 16px; border-left: 2px solid var(--fg); color: var(--muted); white-space: pre-line; }

.credits-title { color: var(--fg); }
.credits .commits .ava { object-fit: cover; }
.credits .commits .meta { align-items: center; }
.credits .commits .dc-badge { width: 14px; height: 14px; }
.credits .commits li a { align-items: center; }

.credits li.hl .msg { color: #ff3b3b; text-shadow: 0 0 12px rgba(255, 59, 59, .45); }
.credits li.hl a:hover { border-left-color: #ff3b3b; }
.tip {
  position: fixed; z-index: 50; max-width: 280px; padding: 8px 12px;
  background: rgba(10,10,10,.96); border: 1px solid rgba(255,255,255,.2); color: var(--fg);
  font-size: 13px; line-height: 1.45; pointer-events: none; white-space: pre-line;
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.tip.on { opacity: 1; transform: none; }

.dc-note[hidden] { display: none; }
.dc-note {
  display: grid; gap: 8px; margin-top: 6px; padding: 14px 16px;
  background: rgba(0,0,0,.28); border-left: 3px solid var(--dc-accent); border-radius: 8px;
}
.dc-note-text { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.92); }
.dc-note-text p { margin: 0 0 8px; }
.dc-note-text p:last-child { margin-bottom: 0; }


.hud {
  display: grid; grid-template-columns: auto minmax(0, auto) auto;
  grid-template-areas: "td pr np" "st st st";
  align-items: center; column-gap: clamp(18px, 2.2vw, 32px);
  width: max-content; max-width: calc(100vw - 2 * var(--pad));
  margin-top: clamp(10px, 1.4vw, 22px);
}
.hud .td { grid-area: td; }
.hud .time { margin-top: 0; }
.hud .presence { grid-area: pr; }
.hud .np { grid-area: np; }
.hud .stats { grid-area: st; width: 0; min-width: 100%; }
.hud .stat-row { width: 100%; max-width: none; justify-content: space-between; }

.np[hidden] { display: none; }
.np {
  position: relative; display: block; overflow: hidden; flex: none;
  width: var(--np-size, 72px); height: var(--np-size, 72px); border-radius: 8px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--fg); text-decoration: none;
  box-shadow: 0 8px 28px rgba(0,0,0,.55); transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .2s;
}
.np:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.35); }
.np-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.np-art:not([src]) { display: none; }
.np-meta {
  position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 1px; padding: 14px 6px 6px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.85)); opacity: 0; transition: opacity .2s;
}
.np:hover .np-meta, .np:focus-visible .np-meta { opacity: 1; }
.np-song { font-size: 10px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.15); }
.np-bar i { display: block; height: 100%; width: 0; background: #1ed760; transition: width 1s linear; }
.np.idle::before {
  content: "\266B"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: calc(var(--np-size, 72px) * .38); color: rgba(255,255,255,.22);
}
.np.idle .np-meta { opacity: 1; background: none; text-align: center; padding-bottom: 7px; }
.np.idle .np-song { font-size: 8.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.np.idle .np-artist, .np.idle .np-bar { display: none; }
.presence[hidden] { display: none; }
.presence {
  display: flex; align-items: center; gap: 12px;
  padding-left: clamp(18px, 2.2vw, 32px); border-left: 1px solid var(--faint);
  color: var(--fg); text-decoration: none; text-shadow: 0 2px 14px rgba(0,0,0,.9);
  max-width: 230px; min-width: 0; transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.presence:hover { transform: translateX(4px); }
.pr-ava-wrap { position: relative; flex: none; width: 46px; height: 46px; }
.pr-ava { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block; background: rgba(255,255,255,.08); }
.pr-dot {
  position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 50%;
  border: 3px solid #0d0d0d; background: #80848e; transition: background .3s;
}
.presence[data-status="online"] .pr-dot { box-shadow: 0 0 10px rgba(35,165,90,.7); }
.pr-text { display: grid; gap: 3px; min-width: 0; }
.pr-top { display: grid; gap: 1px; min-width: 0; }
.pr-name { font-size: 16px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-status { font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.pr-custom[hidden], .pr-activity[hidden], .pr-art[hidden] { display: none; }
.pr-custom { font-size: 12.5px; color: rgba(255,255,255,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-emoji { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.pr-activity { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; }
.pr-art { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex: none; }
.pr-act-text { display: grid; min-width: 0; }
.pr-act-title { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-act-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .hud { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "td np" "pr pr" "st st"; row-gap: 12px; }
  .presence { border-left: 0; padding-left: 0; max-width: 100%; }
  .pr-ava-wrap, .pr-ava { width: 36px; height: 36px; }
}

@media (max-width: 760px) {
  body::before {
    content: ""; position: fixed; inset: 0 0 auto 0; height: 52vh; z-index: 3; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.45) 55%, transparent 100%);
  }
}
@media (max-width: 760px) {
  .np.idle .np-meta { display: none; }
}

.heatmap-link { display: block; width: 100%; margin-top: 2px; }
.heatmap[hidden] { display: none; }
.heatmap {
  --hm-cell: 10; --hm-gap: 3;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, calc(var(--hm-cell) * 1px));
  gap: calc(var(--hm-gap) * 1px); justify-content: space-between;
  animation: enter .9s cubic-bezier(.2,.7,.2,1) both;
}
.heatmap i { width: calc(var(--hm-cell) * 1px); height: calc(var(--hm-cell) * 1px); border-radius: 2px; background: rgba(255,255,255,.07); }
.heatmap i.l1 { background: rgba(255,255,255,.28); }
.heatmap i.l2 { background: rgba(255,255,255,.5); }
.heatmap i.l3 { background: rgba(255,255,255,.75); }
.heatmap i.l4 { background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.6); }
.heatmap-link:hover .heatmap i { outline: 1px solid rgba(255,255,255,.04); }
@media (max-height: 760px) and (min-width: 761px) {
  .heatmap { --hm-cell: 8; --hm-gap: 2; }
}

body.tight .day { font-size: min(5.6vw, 9vh); }
body.tight .hud { margin-top: 1vh; }
body.tight .time { font-size: min(2.8vw, 4.6vh); }
body.tight .stats { margin-top: 1.8vh; gap: 5px; }
body.tight .stat-row { padding-bottom: 6px; }
body.tight .stat .num { font-size: min(2vw, 3.6vh); }
body.tight .heatmap { --hm-cell: 6; --hm-gap: 2; }
body.tight #menu .label { font-size: min(1.8vw, 3.6vh); }
body.tight #menu ul { gap: 0; }
body.tight #menu button { padding-top: 3px; padding-bottom: 3px; }
body.tighter .heatmap-link { display: none; }
@media (max-width: 760px) {
  .hud { width: calc(100vw - 2 * var(--pad)); }
  .hud .np { justify-self: end; }
  .stats .lbl { letter-spacing: .18em; font-size: 9px; }
}
body.tight .np.idle .np-meta { display: none; }

.cards.contact-mode { display: block; }
.cf-wrap { max-width: 760px; animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.cf { display: grid; gap: 26px; }
.cf-intro { margin: 0; color: var(--muted); max-width: 60ch; line-height: 1.6; }
.cf-field { display: grid; gap: 10px; position: relative; }
.cf-label { font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.cf-input {
  width: 100%; font: 700 16px/1.5 "Quicksand", system-ui, sans-serif; color: var(--fg);
  background: rgba(255,255,255,.03); border: 0; border-bottom: 1px solid rgba(255,255,255,.22);
  padding: 12px 14px; border-radius: 0; outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
}
.cf-input::placeholder { color: rgba(255,255,255,.28); }
.cf-input:focus { border-bottom-color: var(--fg); background: rgba(255,255,255,.06); box-shadow: 0 8px 22px -14px rgba(255,255,255,.5); }
.cf-input[aria-invalid="true"] { border-bottom-color: #f23f43; }
.cf-text { resize: vertical; min-height: 150px; }
.cf-counter { justify-self: end; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cf-counter.warn { color: #f0b232; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.cf-id-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.cf-id-status { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 13px; color: var(--muted); }
.cf-id-status.bad { color: #ff6b6e; }
.cf-id-status.ok { padding: 4px 12px 4px 4px; border: 1px solid rgba(35,165,90,.5); background: rgba(35,165,90,.08); border-radius: 999px; color: var(--fg); animation: rise .3s ease both; }
.cf-ava { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.cf-who { display: grid; line-height: 1.15; }
.cf-who strong { font-size: 14px; }
.cf-who small { font-size: 11px; color: var(--muted); }
.cf-tick { width: 18px; height: 18px; border-radius: 50%; background: #23a55a; position: relative; flex: none; }
.cf-tick::after { content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cf-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--fg); animation: cfspin .7s linear infinite; }
@keyframes cfspin { to { transform: rotate(360deg); } }
.cf-id-help { display: grid; gap: 6px; }
.cf-link { justify-self: start; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.cf-link:hover { color: var(--fg); }
.cf-help { font-size: 13px; color: rgba(255,255,255,.75); padding: 10px 14px; border-left: 2px solid var(--fg); background: rgba(255,255,255,.04); max-width: 60ch; }
.cf-help[hidden] { display: none; }

.cf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-chip {
  padding: 8px 16px; border: 1px solid var(--line); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); background: rgba(255,255,255,.02); transition: color .2s, border-color .2s, background .2s;
}
.cf-chip:hover { color: var(--fg); border-color: rgba(255,255,255,.4); }
.cf-chip[aria-checked="true"] { color: #0a0a0a; background: var(--fg); border-color: var(--fg); }
.cf-chips.small .cf-chip { padding: 6px 12px; font-size: 11px; }

.cf-pays { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cf-pay {
  display: grid; gap: 6px; text-align: left; padding: 18px 20px; border: 1px solid var(--line);
  background: rgba(255,255,255,.02); transition: border-color .25s, background .25s, transform .25s, box-shadow .25s;
}
.cf-pay:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.35); }
.cf-pay-title { font: 400 20px/1 "Anurati", sans-serif; letter-spacing: .25em; text-transform: uppercase; }
.cf-pay-sub { font-size: 12.5px; color: var(--muted); }
.cf-pay-paid[aria-checked="true"] { border-color: #f23f43; background: rgba(242,63,67,.1); box-shadow: 0 0 28px -10px rgba(242,63,67,.7); }
.cf-pay-free[aria-checked="true"] { border-color: var(--fg); background: rgba(255,255,255,.07); }
.cf-budget { display: grid; gap: 10px; margin-top: 4px; animation: rise .3s ease both; }
.cf-budget[hidden] { display: none; }

.cf-error { margin: 0; color: #ff6b6e; font-size: 14px; padding: 10px 14px; border-left: 2px solid #f23f43; background: rgba(242,63,67,.08); }
.cf-error[hidden] { display: none; }
.cf-actions { display: flex; justify-content: flex-start; }
.cf-submit {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 220px;
  padding: 16px 28px; background: var(--fg); color: #0a0a0a; text-decoration: none;
  font: 400 15px/1 "Anurati", sans-serif; letter-spacing: .32em; text-transform: uppercase;
  transition: transform .25s, box-shadow .25s, opacity .2s;
  box-shadow: 0 10px 30px -12px rgba(255,255,255,.6);
}
.cf-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 36px -12px rgba(255,255,255,.8); }
.cf-submit:disabled { opacity: .3; cursor: not-allowed; box-shadow: none; }
.cf-submit.busy { opacity: .6; cursor: progress; }

.cf-done { display: grid; gap: 12px; justify-items: start; padding: 28px 0; animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.cf-done h3 { margin: 0; font: 400 clamp(24px, 3vw, 36px)/1.1 "Anurati", sans-serif; letter-spacing: .25em; text-transform: uppercase; }
.cf-done p { margin: 0; max-width: 56ch; line-height: 1.6; }
.cf-muted { color: var(--muted); }
.cf-done-mark { width: 56px; height: 56px; border-radius: 50%; border: 2px solid #23a55a; position: relative; box-shadow: 0 0 30px -6px rgba(35,165,90,.7); }
.cf-done-mark::after { content: ""; position: absolute; left: 19px; top: 10px; width: 12px; height: 24px; border: solid #23a55a; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.cf-join { margin-top: 8px; }

@media (max-width: 760px) {
  .cf-pays { grid-template-columns: 1fr; }
  .cf-id-row { grid-template-columns: 1fr; }
  .cf-submit { width: 100%; }
}

.apply-box { display: grid; gap: 8px; justify-items: start; margin-right: 6px; }
.apply-btn {
  padding: 14px 30px; background: var(--fg); color: #0a0a0a;
  font: 400 15px/1 "Anurati", sans-serif; letter-spacing: .34em; text-transform: uppercase;
  box-shadow: 0 10px 30px -12px rgba(255,255,255,.6); transition: transform .25s, box-shadow .25s;
}
.apply-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -12px rgba(255,255,255,.85); }
.apply-note { margin: 0; font-size: 12px; color: var(--muted); max-width: 46ch; }
.links:has(.apply-box) { align-items: flex-start; }

.cf-org { margin: 0 0 -14px; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.cf-row { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 18px; }
.cf-row-2 { grid-template-columns: 1fr 1fr; }
.cf-short { min-height: 0; }
.cf-input[type="number"] { -moz-appearance: textfield; }
.cf-input[type="number"]::-webkit-outer-spin-button, .cf-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cf-input[hidden] { display: none; }
.cf-chips[aria-invalid="true"] .cf-chip { border-color: rgba(242,63,67,.6); }
.cf-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; cursor: pointer; max-width: 62ch; }
.cf-check-input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.04); display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s; }
.cf-check-input:checked { background: var(--fg); border-color: var(--fg); }
.cf-check-input:checked::after { content: ""; width: 5px; height: 10px; border: solid #0a0a0a; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.cf-check-input[aria-invalid="true"] { border-color: #f23f43; }
@media (max-width: 760px) {
  .cf-row, .cf-row-2 { grid-template-columns: 1fr; }
}
