

:root {
  --y-bg: #ffffff;
  --y-fg: #0a0a0a;
  --y-fg2: #5b5b5b;
  --y-line: #e4e4e4;
  --y-surface: #f5f5f5;
  --y-accent: #1f3dff;
  --y-accent-soft: rgba(31, 61, 255, 0.12);
  --y-font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --y-font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --y-bg: #0a0a0a;
  --y-fg: #f4f4f4;
  --y-fg2: #9b9b9b;
  --y-line: #272727;
  --y-surface: #151515;
  --y-accent: #8ea2ff;
  --y-accent-soft: rgba(142, 162, 255, 0.16);
  color-scheme: dark;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

.yl-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--y-bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--y-line);
  color: var(--y-fg);
  font-family: var(--y-font-display);
}
.yl-bar *, .yl-bar *::before, .yl-bar *::after { box-sizing: border-box; }
.yl-bar-in {
  max-width: 1320px;
  margin-inline: auto;
  padding: 10px clamp(16px, 3vw, 32px);
  display: flex;
  align-items: center;
  gap: 14px;
}
.yl-logo {
  display: inline-flex;
  align-items: baseline;
  color: var(--y-fg);
  text-decoration: none;
  font-weight: 800;
  font-stretch: 118%;
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: -0.035em;
}
.yl-logo:focus-visible, .yl-lang button:focus-visible, .yl-theme:focus-visible { outline: 2px solid var(--y-accent); outline-offset: 3px; }
.yl-dots { display: inline-flex; align-items: flex-end; gap: 0.07em; margin-left: 0.08em; }
.yl-dots i {
  display: block;
  width: 0.2em;
  height: 0.2em;
  border-radius: 50%;
  background: var(--y-accent);
  margin-bottom: 0.04em;
  animation: yl-wave 1.5s ease-in-out infinite;
}
.yl-dots i:nth-child(2) { animation-delay: 0.16s; }
.yl-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes yl-wave {
  0%, 55%, 100% { transform: translateY(0); opacity: 0.5; }
  28% { transform: translateY(-0.32em); opacity: 1; }
}
.yl-crumb { font-family: var(--y-font-mono); font-weight: 500; font-size: 0.8rem; color: var(--y-fg2); display: inline-flex; gap: 10px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yl-crumb::before { content: "/"; opacity: 0.5; }

.yl-ctl { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.yl-lang {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--y-line);
  border-radius: 999px;
  background: var(--y-surface);
}
.yl-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 2);
  border-radius: 999px;
  background: var(--y-fg);
  transition: transform 0.38s cubic-bezier(0.3, 1.35, 0.5, 1);
}
.yl-lang[data-v="en"] .yl-thumb { transform: translateX(100%); }
.yl-lang button {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  border-radius: 999px;
  padding: 5px 12px;
  min-width: 40px;
  font: 600 0.76rem var(--y-font-mono);
  letter-spacing: 0.06em;
  color: var(--y-fg2);
  cursor: pointer;
  transition: color 0.25s ease;
}
.yl-lang button[aria-checked="true"] { color: var(--y-bg); }
.yl-lang button:not([aria-checked="true"]):hover { color: var(--y-fg); }

.yl-theme {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid var(--y-line);
  border-radius: 50%;
  background: var(--y-surface);
  color: var(--y-fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, border-color 0.2s ease;
}
.yl-theme:hover { border-color: var(--y-fg2); transform: rotate(14deg); }
.yl-theme svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.5s cubic-bezier(0.3, 1.2, 0.4, 1), opacity 0.3s ease; }
.yl-theme .i-sun { opacity: 0; transform: rotate(-90deg) scale(0.4); }
.yl-theme .i-moon { opacity: 1; transform: none; }
:root[data-theme="dark"] .yl-theme .i-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .yl-theme .i-moon { opacity: 0; transform: rotate(90deg) scale(0.4); }

html.vt-theme::view-transition-old(root),
html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.vt-theme::view-transition-new(root) { z-index: 2; }
html.vt-theme::view-transition-old(root) { z-index: 1; }

html.vt-lang::view-transition-old(root) { animation: yl-out 0.2s ease both; }
html.vt-lang::view-transition-new(root) { animation: yl-in 0.34s ease both; }
@keyframes yl-out { to { opacity: 0; filter: blur(6px); } }
@keyframes yl-in { from { opacity: 0; filter: blur(6px); } }

.yl-foot {
  margin-top: auto;
  max-width: 1320px;
  margin-inline: auto;
  width: 100%;
  padding: 26px clamp(16px, 3vw, 32px) 34px;
  border-top: 1px solid var(--y-line);
  font: 500 0.78rem var(--y-font-mono);
  color: var(--y-fg2);
}

@media (max-width: 520px) {
  .yl-crumb { display: none; }
  .yl-logo { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .yl-dots i { animation: none; opacity: 1; }
  .yl-thumb, .yl-theme, .yl-theme svg { transition: none; }
}
