@charset "UTF-8";
/* enes.codes — shared styles */

/* JetBrains Mono (SIL Open Font License, see assets/fonts/OFL.txt), served by the
   site itself. One variable file per alphabet covers both weights in use. */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


:root {
  color-scheme: dark;
  --bg: #0b0908;
  --fg: #ece3d6;
  --muted: #6b625a;
  --accent: #f0444b;
  --str: #f0a074;
  --name: #c9c3d9;
  --line: rgb(236 227 214 / 0.08);
  --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* no grey/blue box on tap (Android); controls give their own feedback */
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

:where(a, button):focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- editor tabs: the site's navigation ---------- */

.bar {
  position: relative;
  z-index: 51; /* above the film grain, which would dim the tabs */
  display: flex;
  flex: none;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.bar::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.5rem;
  margin-bottom: -1px;
  padding: 0.6rem 1rem;
  font-size: 0.8125rem;
  color: rgb(236 227 214 / 0.55);
  text-decoration: none;
  border-top: 2px solid transparent;
  border-inline: 1px solid transparent;
}

a.tab:hover {
  color: var(--fg);
}

/* inside the tab, so the scrolling tab bar does not clip it */
.tab:focus-visible {
  outline-offset: -3px;
}

.tab[aria-current="page"] {
  color: var(--fg);
  background: rgb(236 227 214 / 0.03);
  border-top-color: var(--accent);
  border-inline-color: var(--line);
}

.tab[aria-current="page"]::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

@media (pointer: coarse) {
  .tab {
    min-height: 44px;
  }
}

/* ---------- cursor ---------- */

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 0.95em;
  margin-left: 0.08em;
  vertical-align: -0.12em;
  background: var(--accent);
  box-shadow: 0 0 0.6em rgb(240 68 75 / 0.45);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.8rem 1.3rem;
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  background: var(--accent);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 0 1.5rem rgb(240 68 75 / 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  box-shadow: 0 0 2.2rem rgb(240 68 75 / 0.4);
}

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

/* ---------- code colours ---------- */

.tok-kw {
  color: var(--accent);
}

.tok-str,
.tok-num {
  color: var(--str);
}

.tok-prop {
  color: var(--name);
}

.editor .tok-prop {
  color: #e8b088;
}

.tok-comment {
  color: var(--name);
  font-style: italic;
}

.tok-plain {
  color: var(--fg);
}

/* ---------- film grain + vignette ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  pointer-events: none;
}

.grain::before {
  content: "";
  position: absolute;
  inset: -60px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06;
  animation: grain 0.5s steps(3) infinite;
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgb(0 0 0 / 0.55) 100%);
}

@keyframes grain {
  33% {
    transform: translate(-20px, 12px);
  }
  66% {
    transform: translate(14px, -18px);
  }
}

/* ---------- home ---------- */

.intro {
  display: grid;
  align-content: center;
  min-height: calc(100svh - 3rem);
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 16px;
}

.row {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  align-items: baseline;
  justify-items: start;
  min-height: 1.6em;
}

.ln {
  color: var(--muted);
  font-size: 0.8125rem;
  user-select: none;
}

.intro h1 {
  margin: 0;
  font-size: clamp(3.5rem, 16vw, 8.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-shadow: 0 0 2rem rgb(236 227 214 / 0.12);
}

.role {
  margin: 0.25rem 0 0;
  font-size: clamp(1.125rem, 3.5vw, 1.5rem);
  color: var(--name);
}

.ig {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--str);
  text-decoration: underline;
  text-decoration-color: rgb(240 160 116 / 0.35);
  text-underline-offset: 0.25em;
}

.ig:hover {
  text-decoration-color: currentColor;
}

.row-btn {
  margin-top: 1rem;
}

/* opening: the name types itself, then the other lines appear one by one */

@media (prefers-reduced-motion: no-preference) {
  .home .type {
    display: inline-block;
    white-space: nowrap;
    animation: type 0.44s steps(4, end) 0.25s backwards;
  }

  .home .row {
    animation: row-in 0.4s ease-out backwards;
  }

  .home .row:nth-child(1) {
    animation: none;
  }

  .home .row:nth-child(2) {
    animation-delay: 0.8s;
  }

  .home .row:nth-child(3) {
    animation-delay: 0.92s;
  }

  .home .row:nth-child(4) {
    animation-delay: 1.04s;
  }

  .home .row:nth-child(5) {
    animation-delay: 1.16s;
  }

  .home .row:nth-child(6) {
    animation-delay: 1.28s;
  }
}

/* width and clip exist only while typing, so the finished name keeps its glow */
@keyframes type {
  from {
    width: 0;
    clip-path: inset(-1em 0 -1em -1em);
  }
  to {
    width: calc(4ch - 0.12em);
    clip-path: inset(-1em 0 -1em -1em);
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ---------- projects ---------- */

.projects {
  font-size: clamp(1rem, 2.6vw, 1.35rem);
}

.projects h1 {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 400;
}

.code-line {
  display: block;
  min-width: 0;
  font-family: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ind1 {
  padding-left: 2ch;
}

.ind2 {
  padding-left: 4ch;
}

.pj-link {
  text-decoration: underline;
  text-decoration-color: rgb(240 160 116 / 0.35);
  text-underline-offset: 0.25em;
}

.pj-link:hover {
  text-decoration-color: currentColor;
}

.nav-link {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: rgb(236 227 214 / 0.3);
  text-underline-offset: 0.25em;
}

.nav-link:hover {
  text-decoration-color: currentColor;
}

/* ---------- 404 ---------- */

.notfound h1 {
  margin: 0;
  font-size: clamp(1.75rem, 7vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.nf-path {
  margin: 0.25rem 0 0;
  color: var(--name);
  overflow-wrap: anywhere;
}

/* ---------- /dinle ---------- */

/* no pull-to-refresh on the song page: it would restart the song */
html:has(> body.page-dinle) {
  overscroll-behavior-y: none;
}

.page-dinle {
  display: flex;
  flex-direction: column;
  height: 100svh;
  overflow: hidden;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  /* the panels below size themselves to what the player leaves free */
  container-type: size;
}

/* visibility is driven by body[data-state] */
.panel,
.editor-wrap,
.status {
  display: none;
}

.panel {
  --gap: 1.25rem;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  height: 100%;
  overflow-y: auto;
  padding: 2rem 16px;
  text-align: center;
}

/* equal spacers centre the content while it fits; when it does not,
   they shrink away so it starts at the top and scrolls */
.panel::before,
.panel::after {
  content: "";
  flex: 1 1 0;
}

/* the spacers must not add gaps of their own */
.panel::before {
  margin-bottom: calc(-1 * var(--gap));
}

.panel::after {
  margin-top: calc(-1 * var(--gap));
}

[data-state="hazır"] #intro,
[data-state="yükleniyor"] #intro,
[data-state="hata"] #error,
[data-state="bitti"] #end,
.panel.noscript {
  display: flex;
}

/* short stage: most phones once the browser bars and the player are counted */
@container (max-height: 480px) {
  .panel {
    --gap: 0.6rem;
    padding-block: 0.5rem;
  }

  .bubble svg {
    width: 84px;
    height: auto;
  }

  #end .btn,
  #error .btn {
    padding-block: 0.6rem;
  }

  .share-status:empty {
    display: none;
  }

  .end-links {
    margin-top: 0;
  }
}

[data-state="yükleniyor"] #start {
  display: none;
}

[data-state="yükleniyor"] .status {
  display: block;
}

[data-state="çalıyor"] .editor-wrap,
[data-state="duraklatıldı"] .editor-wrap {
  display: block;
}

.status {
  margin: 0;
  font-size: 1.125rem;
  color: var(--fg);
}

.st-prompt {
  color: var(--accent);
}

.spinner {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.7em;
  vertical-align: -0.08em;
  border: 2px solid rgb(236 227 214 / 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.error-text {
  margin: 0;
  font-size: 1.125rem;
}

.error-help {
  max-width: 32ch;
  margin: 0;
  font-size: 0.875rem;
  color: var(--name);
}

.slow-note {
  display: none;
  margin: 0;
  font-size: 0.875rem;
  color: var(--name);
}

[data-slow][data-state="yükleniyor"] .slow-note {
  display: block;
}

/* a separator stays on the same line as the button it introduces */
.nowrap {
  white-space: nowrap;
}

/* the phone tap-area rule gives .link a display, which would beat [hidden] */
#hint-fallback[hidden] {
  display: none;
}

/* the page code never loaded: only reloading can help */
[data-slow="kod"] .slow-alt {
  display: none;
}

.hint-box {
  position: absolute;
  top: 12px;
  right: 16px;
  left: 16px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  width: fit-content;
  margin-inline: auto;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  background: #141110;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.hint-box[hidden],
.page-dinle:not([data-state="çalıyor"]):not([data-state="duraklatıldı"]) .hint-box {
  display: none;
}

.hint {
  margin: 0;
  font-style: italic;
  color: var(--name);
  text-align: center;
}

/* editor */

.editor-wrap {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  /* the typed line sits about two thirds down, so the lines above it fill the space */
  scroll-padding-top: 30%;
  /* lines fade out at the top and bottom edges instead of being cut */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 min(2.5rem, 10%), #000 calc(100% - min(2.5rem, 10%)), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 min(2.5rem, 10%), #000 calc(100% - min(2.5rem, 10%)), transparent);
}

/* short stage: two thirds down would put the typed line behind the Console
   card, so it sits higher and clear of the card */
@container (max-height: 480px) {
  .editor-wrap {
    scroll-padding-top: 10%;
    scroll-padding-bottom: 6.5rem;
  }
}

/* a long press on a line while the song plays should not start a text selection */
[data-state="çalıyor"] .editor,
[data-state="duraklatıldı"] .editor {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.editor-wrap:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: -4px;
}

.editor-wrap::-webkit-scrollbar {
  display: none;
}

.editor {
  max-width: 60rem;
  margin: 0 auto;
  padding: 35svh 16px 55svh;
  font-size: clamp(1.15rem, 3.6vw, 2rem);
  line-height: 1.55;
}

.line {
  display: grid;
  grid-template-columns: 2.5em 1fr;
  align-items: baseline;
  filter: blur(calc(min(var(--d, 0), 4) * 0.4px));
  opacity: calc(1 - min(var(--d, 0), 5) * 0.12);
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.line.is-active {
  text-shadow: 0 0 1.2rem rgb(236 227 214 / 0.14);
}

.line:not(.is-active) .code {
  text-shadow: -0.7px 0 rgb(240 68 75 / 0.28), 0.7px 0 rgb(110 185 255 / 0.2);
}

.line .ln {
  font-size: 0.5em;
}

.code {
  min-width: 0;
  font-family: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.editor .cursor {
  height: 1.05em;
  vertical-align: -0.2em;
  box-shadow: 0 0 0.75em rgb(240 68 75 / 0.75), 0 0 1.6em rgb(240 68 75 / 0.35);
}

/* solid while typing, blinks while waiting or paused */
.line.is-typing .cursor {
  animation: none;
}

[data-state="duraklatıldı"] .line.is-typing .cursor {
  animation: blink 1.1s steps(1) infinite;
}

/* console card */

.console {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 5;
  width: min(26rem, calc(100% - 32px));
  font-size: 0.875rem;
  background: #141110;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgb(0 0 0 / 0.65);
  animation: card-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.console[hidden],
.page-dinle:not([data-state="çalıyor"]):not([data-state="duraklatıldı"]) .console {
  display: none;
}

.console-head {
  padding: 0.5rem 0.85rem;
  font-size: 0.75rem;
  color: var(--name);
  border-bottom: 1px solid var(--line);
}

.console-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.85rem;
}

.console-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.console-file {
  font-size: 0.75rem;
  color: var(--name);
  white-space: nowrap;
}

/* Boarding pass card (bilet / bilet-iptal) */
.console[data-kind="bilet"],
.console[data-kind="bilet-iptal"] {
  overflow: hidden;
  color: #181311;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 calc(100% - 44px),
      rgb(24 19 17 / 0.18) calc(100% - 44px) calc(100% - 43px),
      transparent calc(100% - 43px) 100%
    ),
    #ede2d3;
  border-color: rgb(240 68 75 / 0.45);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.65), 0 0 1.5rem rgb(240 68 75 / 0.18);
}

.console[data-kind="bilet"] .console-head,
.console[data-kind="bilet-iptal"] .console-head {
  padding: 0.4rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--accent);
  border-bottom: 0;
}

.console[data-kind="bilet"] .console-text,
.console[data-kind="bilet-iptal"] .console-text {
  color: #181311;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.console[data-kind="bilet"] .console-file,
.console[data-kind="bilet-iptal"] .console-file {
  color: #5a4e46;
  font-weight: 700;
}

.console[data-kind="bilet-iptal"]::after {
  content: "NOT BOARDED";
  position: absolute;
  top: 52%;
  left: 50%;
  padding: 0.15rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgb(237 226 211 / 0.88);
  border: 2px solid var(--accent);
  border-radius: 3px;
  transform: translate(-50%, -50%) rotate(-8deg);
  pointer-events: none;
}

/* Incoming / missed call card (arama / cevapsiz) */
.console[data-kind="arama"],
.console[data-kind="cevapsiz"] {
  width: min(21rem, calc(100% - 32px));
  background: #171413;
  border-radius: 14px;
}

.console[data-kind="arama"] .console-head,
.console[data-kind="cevapsiz"] .console-head {
  display: none;
}

.console[data-kind="arama"] .console-body,
.console[data-kind="cevapsiz"] .console-body {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  grid-template-areas:
    "av who dot"
    "av st  dot";
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.05rem;
  padding: 0.75rem 0.95rem;
}

.console[data-kind="arama"] .console-body::before,
.console[data-kind="cevapsiz"] .console-body::before {
  content: "";
  grid-area: av;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, #6b625a 0 22%, transparent 23%),
    radial-gradient(circle at 50% 95%, #6b625a 0 42%, transparent 43%),
    #26211f;
}

.console[data-kind="arama"] .console-body::after,
.console[data-kind="cevapsiz"] .console-body::after {
  content: "";
  grid-area: dot;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #35c759;
  box-shadow: 0 0 0.75rem rgb(53 199 89 / 0.8);
}

.console[data-kind="cevapsiz"] .console-body::after {
  background: var(--accent);
  box-shadow: 0 0 0.75rem rgb(240 68 75 / 0.8);
}

.console[data-kind="arama"] .console-text,
.console[data-kind="cevapsiz"] .console-text {
  grid-area: who;
  font-size: 0.95rem;
  color: var(--fg);
}

.console[data-kind="arama"] .console-file,
.console[data-kind="cevapsiz"] .console-file {
  grid-area: st;
  font-size: 0.75rem;
  color: var(--name);
}

.console[data-kind="cevapsiz"] .console-file {
  color: var(--accent);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* player panel: docked under the editor like an IDE's terminal panel. */

.nowplaying {
  display: none;
  position: relative;
  z-index: 60;
  background: #141110;
  border-top: 1px solid var(--line);
}

[data-music="on"] .nowplaying,
[data-music="off"][data-state="çalıyor"] .nowplaying,
[data-music="off"][data-state="duraklatıldı"] .nowplaying {
  display: block;
}

.np-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 60rem;
  margin: 0 auto;
}

.np-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: 10px 16px 0;
}

.np-meta {
  min-width: 0;
}

.np-title,
.np-artist {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.np-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.np-artist {
  margin: 0.1rem 0 0;
  font-size: 0.8125rem;
  color: var(--name);
}

.np-volume {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.5rem;
}

[data-music="off"] .np-volume,
[data-volume="off"] .np-volume {
  display: none;
}

.np-mute {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--name);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.np-mute:hover {
  color: var(--fg);
  border-color: rgb(236 227 214 / 0.25);
}

.np-mute svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.np-mute .wave {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.np-mute .i-muted,
.np-mute[data-muted] .i-sound {
  display: none;
}

.np-mute[data-muted] .i-muted {
  display: block;
}

/* the volume bar only where there is a mouse; phones use their own buttons */
.np-vol-slider {
  display: none;
  width: 96px;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* drawn like the seek bar; --v is the volume, set by dinle.js */
.np-vol-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(to right, var(--accent) calc(var(--v, 100) * 1%), rgb(236 227 214 / 0.14) 0);
  border-radius: 2px;
}

.np-vol-slider::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0.6rem rgb(240 68 75 / 0.6);
  -webkit-appearance: none;
  appearance: none;
}

.np-vol-slider::-moz-range-track {
  height: 4px;
  background: rgb(236 227 214 / 0.14);
  border-radius: 2px;
}

.np-vol-slider::-moz-range-progress {
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.np-vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 0;
  border-radius: 50%;
}

.np-vol-slider:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .np-vol-slider {
    display: block;
  }
}

@media (pointer: coarse) {
  .np-mute {
    width: 44px;
    height: 44px;
  }
}

.np-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 1.25rem rgb(240 68 75 / 0.3);
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.np-toggle:active {
  transform: scale(0.92);
}

.np-mute:active {
  transform: scale(0.92);
}

.np-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.np-toggle .i-pause,
.np-toggle .i-replay,
.np-toggle[data-playing] .i-play,
.np-toggle[data-ended] .i-play {
  display: none;
}

.np-toggle[data-playing] .i-pause,
.np-toggle[data-ended] .i-replay {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .np-toggle:hover {
    box-shadow: 0 0 1.75rem rgb(240 68 75 / 0.55);
  }

  .np-seek:hover .np-track {
    height: 6px;
  }

  .np-seek:hover .np-thumb {
    transform: scale(1.25);
  }
}

.np-seek.is-dragging .np-thumb {
  transform: scale(1.25);
}

.np-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 16px 2px;
}

.np-time {
  flex: none;
  min-width: 4ch;
  font-size: 0.75rem;
  color: var(--name);
}

.np-time:last-child {
  text-align: right;
}

.np-seek {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  height: 44px;
  cursor: pointer;
  /* vertical swipes still scroll the page; horizontal drags seek */
  touch-action: pan-y;
}

@media (hover: hover) and (pointer: fine) {
  .np-seek[data-hover]::after {
    content: attr(data-hover);
    position: absolute;
    bottom: calc(100% - 4px);
    left: clamp(18px, calc(var(--hx, 0) * 100%), calc(100% - 18px));
    padding: 0.12rem 0.4rem;
    font-size: 0.6875rem;
    color: var(--fg);
    background: #1f1b19;
    border: 1px solid var(--line);
    border-radius: 4px;
    transform: translateX(-50%);
    pointer-events: none;
    white-space: nowrap;
  }
}

.np-seek:focus-visible {
  outline: none;
}

.np-seek:focus-visible .np-track {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.np-track {
  position: relative;
  flex: 1;
  height: 4px;
  transition: height 0.15s ease;
  background: rgb(236 227 214 / 0.14);
  border-radius: 2px;
}

.np-fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: inherit;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.np-thumb {
  position: absolute;
  top: 50%;
  left: calc(var(--p, 0) * 100%);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0.6rem rgb(240 68 75 / 0.6);
}

/* a thumb big enough to grab with a finger (after the base rule, so it wins) */
@media (pointer: coarse) {
  .np-thumb {
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
  }
}

/* phones: title and artist share one line, the seek bar follows right below,
   leaving more room for the code above */
@media (max-width: 639px) {
  .np-info {
    padding: 4px 16px 0;
  }

  .np-meta {
    display: flex;
    align-items: baseline;
    gap: 0.4em;
  }

  /* when space runs out the artist is cut, not the song title */
  .np-title {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .np-artist {
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
  }

  .np-artist::before {
    content: "· ";
  }

  .np-volume {
    margin-left: auto;
  }

  .np-toggle {
    width: 44px;
    height: 44px;
  }

  .np-toggle svg {
    width: 20px;
    height: 20px;
  }

  .np-bar {
    margin-top: 4px;
  }

  .np-seek {
    height: 32px;
  }
}

/* tapping another line jumps to it; the line with the cursor stays put */
[data-state="çalıyor"] .line:not(.is-active),
[data-state="duraklatıldı"] .line:not(.is-active) {
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  [data-state="çalıyor"] .line:not(.is-active):hover,
  [data-state="duraklatıldı"] .line:not(.is-active):hover {
    filter: none;
    opacity: 1;
  }

  [data-state="çalıyor"] .line:not(.is-active):hover .ln,
  [data-state="duraklatıldı"] .line:not(.is-active):hover .ln {
    color: var(--accent);
  }
}

.line.flash {
  animation: flash 0.6s ease-out;
}

@keyframes flash {
  from {
    background: rgb(240 68 75 / 0.18);
  }
}

/* until YouTube answers, the panel's controls cannot do anything */
[data-state="yükleniyor"] .np-toggle,
[data-state="yükleniyor"] .np-seek,
[data-state="yükleniyor"] .np-volume {
  opacity: 0.35;
  pointer-events: none;
}

.np-label {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  color: rgb(236 227 214 / 0.55);
}

.np-label::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

/* set by dinle.js from the player, not the page: the music can outlast the lines */
.np-label:not([data-state="çalıyor"])::before {
  background: var(--muted);
}

/* wider screens: title and volume on top, play button beside the seek bar */
@media (min-width: 640px) {
  .console {
    left: max(24px, calc(50% - 30rem + 4.5rem));
    bottom: clamp(2rem, 12svh, 5rem);
  }

  .np-inner {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
      "meta meta vol"
      "toggle bar bar";
    column-gap: 16px;
    row-gap: 8px;
    padding: 12px 16px;
  }

  .np-info {
    display: contents;
  }

  .np-meta {
    grid-area: meta;
    align-self: center;
  }

  .np-toggle {
    grid-area: toggle;
    align-self: center;
  }

  .np-bar {
    grid-area: bar;
    padding: 0;
  }

  .np-volume {
    grid-area: vol;
    align-self: center;
  }

  .np-label {
    display: flex;
  }

  .np-title {
    font-size: 1.5rem;
  }

  .np-artist {
    font-size: 0.9375rem;
  }

  [data-music="off"] .np-inner {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
      "meta meta"
      "toggle bar";
    row-gap: 12px;
  }
}

/* narrow desktop windows: no room for the volume bar, the mute button stays */
@media (min-width: 640px) and (max-width: 899px) {
  .np-vol-slider {
    display: none;
  }
}

/* a window snapped to half of a small screen: the title shares its row with the mute button */
@media (min-width: 640px) and (max-width: 699px) {
  .np-title {
    font-size: 1.25rem;
  }
}

/* phones in landscape: keep the bottom panel compact so the stage has room */
@media (min-width: 640px) and (max-height: 559px) {
  .np-inner,
  [data-music="off"] .np-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: none;
    row-gap: 0;
    padding: 0;
  }

  .np-meta,
  .np-volume,
  .np-toggle,
  .np-bar {
    grid-area: auto;
  }

  .np-info {
    display: flex;
    align-items: center;
    padding: 6px 16px 0;
  }

  .np-bar {
    padding: 0 16px 2px;
  }

  .np-label {
    display: none;
  }

  .np-title {
    font-size: 0.9375rem;
  }

  .np-artist {
    font-size: 0.8125rem;
  }
}

/* end screen */

.bubble {
  display: grid;
  justify-items: end;
  gap: 0.4rem;
}

.bubble svg {
  filter: drop-shadow(0 0 2rem rgb(240 68 75 / 0.35));
  animation: pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.delivered {
  margin: 0;
  font-size: 0.75rem;
  color: var(--name);
}

.end-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0;
  color: var(--muted);
}

.link,
.end-links a {
  padding: 0;
  color: var(--fg);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
}

.end-ig {
  font-size: 0.875rem;
  color: var(--str);
  text-decoration: underline;
  text-decoration-color: rgb(240 160 116 / 0.35);
  text-underline-offset: 0.25em;
}

.share-status {
  min-height: 1.4em;
  margin: -0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--str);
  overflow-wrap: anywhere;
}

/* phones: text links get a 44px tall tap area */
@media (pointer: coarse) {
  .ig,
  .nav-link,
  .pj-link,
  .end-links a,
  .end-links .link,
  .end-ig,
  .slow-note .link,
  .hint-box .link,
  #error .link {
    display: inline-block;
    padding-block: 0.6rem;
  }
}

/* ---------- timing mode (/dinle/?zamanla) ---------- */

[data-mode="zamanla"] .editor-wrap,
[data-mode="zamanla"] .console {
  display: none !important;
}

.timing {
  height: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 16px 0;
  overflow-y: auto;
}

[data-mode="zamanla"][data-state="çalıyor"] .timing:not([hidden]) {
  display: block;
}

.timing-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.timing-help {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: var(--name);
}

.timing-list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.timing-list li {
  display: grid;
  grid-template-columns: 6ch 1fr;
  gap: 1rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
}

.timing-list li.is-next {
  background: rgb(240 68 75 / 0.12);
  outline: 1px solid rgb(240 68 75 / 0.4);
}

.timing-t {
  color: var(--str);
}

.timing-list code {
  min-width: 0;
  font-family: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.timing-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  background: var(--bg);
}

.timing-copied {
  font-size: 0.875rem;
  color: var(--str);
}

.timing-out {
  width: 100%;
  min-height: 12rem;
  margin-bottom: 2rem;
  padding: 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--fg);
  background: #141110;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* ---------- /istatistik (hidden dashboard) ---------- */

.stats {
  align-content: start;
  padding-top: 2rem;
}

.stats h1 {
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.stats-auth {
  display: grid;
  gap: 0.9rem;
  max-width: 24rem;
  margin-top: 12svh;
}

.stats-form {
  display: flex;
  gap: 0.75rem;
}

.stats-input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--fg);
  background: #141110;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.stats-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.stats-err {
  margin: 0;
  font-size: 0.875rem;
  color: var(--accent);
}

.stats-panel {
  display: grid;
  gap: 1.5rem;
  width: 100%;
}

.stats-panel[hidden],
.stats-auth[hidden] {
  display: none;
}

.stats-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.stats-head p {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
}

.stats-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stats-btn {
  padding: 0.5rem 0.95rem;
  font-size: 0.875rem;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.85rem;
}

.stats-card {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  background: #141110;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats-label {
  font-size: 0.75rem;
  color: var(--name);
}

.stats-val {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent);
}

.stats-sub {
  font-size: 0.75rem;
  color: var(--str);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.stats-box {
  padding: 1rem 1.15rem;
  background: #141110;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats-box-title {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  font-weight: 400;
  font-style: italic;
  color: var(--name);
}

.stats-list,
.stats-feed {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.stats-row-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.stats-k {
  color: var(--fg);
  overflow-wrap: anywhere;
}

.stats-v {
  font-weight: 700;
  color: var(--str);
}

.stats-bar {
  height: 4px;
  background: rgb(236 227 214 / 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.stats-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.stats-feed li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.45rem 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--line);
}

.stats-feed li:last-child {
  border-bottom: 0;
}

.feed-time {
  color: var(--muted);
  white-space: nowrap;
}

.feed-act {
  color: var(--fg);
}

.feed-meta {
  color: var(--str);
  font-size: 0.75rem;
}

.stats-empty {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--muted);
}

@media (max-width: 639px) {
  .stats-feed li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .grain::before,
  .console,
  .bubble svg,
  .spinner,
  .line.flash,
  [data-state="duraklatıldı"] .line.is-typing .cursor {
    animation: none;
  }

  .btn,
  .line {
    transition: none;
  }
}
