/* The site's chrome for the stage look, copied from site.css (the classic look keeps its own copy):
   the app's tokens, the donate QR, the face, and the Windows 11 taskbar with MusicBar playing on it.
   Regenerate with web/redesign/.scratch/extract_chrome.py when the classic taskbar changes. */

:root {
  --ground: #1C1C20;
  --card: rgba(255, 255, 255, .05);
  --card-line: rgba(255, 255, 255, .07);
  --panel: rgba(20, 20, 24, .96);
  --panel-edge: rgba(255, 255, 255, .14);
  --wash: rgba(255, 107, 107, .13);
  --accent: #FF6B6B;
  --on-accent: #101014;
  --soft: rgba(255, 255, 255, .10);
  --soft-hover: rgba(255, 255, 255, .16);
  --soft-line: rgba(255, 255, 255, .10);
  --text: #FFFFFF;
  --text-2: rgba(255, 255, 255, .72);
  --text-3: rgba(255, 255, 255, .56);
  --screen: #0E0E10;

  --f-display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --f-text: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --f-code: "Cascadia Mono", Consolas, ui-monospace, monospace;

  --side: 256px;
  --tb-h: 48px;

  /* the taskbar: Windows 11 dark, the accent set to MusicBar's coral */
  --win-bg: rgba(28, 28, 32, .86);
  --win-flyout: rgba(36, 36, 40, .95);
  --win-line: rgba(255, 255, 255, .08);
  --win-hover: rgba(255, 255, 255, .07);
  --win-press: rgba(255, 255, 255, .04);
  --win-text: #fff;
  --win-sub: rgba(255, 255, 255, .62);
  --win-accent: #FF6B6B;
  --f-win: var(--f-text);
}


/* ------------------------------------------------------------------ a coffee for the author (Vietnamese pages) */

.donate { position: fixed; right: 14px; bottom: calc(var(--tb-h) + 14px); z-index: 55; display: grid; justify-items: end; }
.donate-pill { display: grid; justify-items: center; gap: 6px; padding: 8px 8px 7px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-edge); color: var(--text); font: 600 12px var(--f-text); cursor: pointer; transform-origin: 50% 100%; animation: wiggle 4.8s ease-in-out 2s infinite; }
.donate-pill img { width: 72px; height: 72px; border-radius: 6px; background: #fff; padding: 3px; }
.donate-pill:hover { animation-play-state: paused; border-color: var(--accent); }
.donate-heart { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 26px; background: rgba(255, 107, 107, .14); color: var(--accent); }
.donate-heart .i { width: 26px; height: 26px; }
.donate-card > .btn { justify-content: center; }
.donate-pill[aria-expanded="true"] { display: none; }
@keyframes wiggle {
  0%, 84%, 100% { transform: rotate(0); }
  86% { transform: rotate(-10deg) scale(1.04); }
  89% { transform: rotate(9deg) scale(1.04); }
  92% { transform: rotate(-6deg); }
  95% { transform: rotate(4deg); }
  97% { transform: rotate(-2deg); }
}
.donate-card { position: relative; width: min(300px, calc(100vw - 28px)); padding: 16px; border-radius: 14px; background: linear-gradient(180deg, var(--wash), rgba(255, 107, 107, 0) 90px), #17171B; border: 1px solid var(--panel-edge); box-shadow: 0 12px 36px rgba(0, 0, 0, .45); display: grid; gap: 10px; }
.donate-card img { width: 100%; height: auto; border-radius: 10px; }
.donate-title { margin: 0; font: 600 16px var(--f-display); padding-right: 40px; }
.donate-note { margin: 0; font-size: 12.5px; color: var(--text-2); }
.donate-x { position: absolute; top: 10px; right: 10px; }
/* A toast never lands on top of it. */
body:has(.donate) .toasts { bottom: calc(var(--tb-h) + 136px); }
@media (max-width: 900px) {
  .donate { right: 10px; bottom: calc(var(--tb-h) + 10px); }
  .donate-pill { padding: 6px; }
  .donate-pill img { width: 52px; height: 52px; }
  .donate-pill span { display: none; }
}

/* ------------------------------------------------------------------ the face (from the app and the promo) */

.face { --s: 1; position: relative; width: calc(44px * var(--s)); height: calc(32px * var(--s)); flex: none; }
.face .eye { position: absolute; top: 0; width: calc(13px * var(--s)); height: calc(17px * var(--s)); border-radius: 50%; background: #FFFDF6; box-shadow: 0 0 0 calc(1.6px * var(--s)) #15171E; overflow: hidden; }
.face .eye.l { left: calc(8px * var(--s)); }
.face .eye.r { left: calc(24px * var(--s)); }
.face .eye::before { content: ""; position: absolute; left: 32%; top: 34%; width: 46%; height: 46%; border-radius: 50%; background: #15171E; }
.face .eye::after { content: ""; position: absolute; left: 22%; top: 12%; width: 22%; height: 18%; border-radius: 50%; background: #fff; }
.face .mouth { position: absolute; left: calc(11px * var(--s)); top: calc(20px * var(--s)); width: calc(22px * var(--s)); height: calc(10px * var(--s)); border: calc(2.4px * var(--s)) solid #FFFDF6; border-top: 0; border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.face.sing .mouth { top: calc(18px * var(--s)); height: calc(13px * var(--s)); background: #120C10; border: calc(2.2px * var(--s)) solid #FFFDF6; border-radius: calc(2px * var(--s)) calc(2px * var(--s)) 50% 50% / calc(2px * var(--s)) calc(2px * var(--s)) 100% 100%; overflow: hidden; transform-origin: 50% 0; animation: sing .5085s ease-in-out infinite; }
.face.sing .mouth::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: -10%; height: 45%; border-radius: 50%; background: #FF7B8A; }
.face.blink .eye { animation: blink 4.2s infinite; }
@keyframes sing { 50% { transform: scaleY(.5); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
html.still .face .eye, html.still .face .mouth { animation: none; }

/* ------------------------------------------------------------------ the Windows 11 taskbar */

.tb {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--tb-h);
  z-index: 60;
  font-family: var(--f-win);
  font-size: 12px;
  font-stretch: 100%;
  color: var(--win-text);
  user-select: none;
  -webkit-font-smoothing: auto;
}
.tb-bg { position: absolute; inset: 0; background: var(--win-bg); -webkit-backdrop-filter: blur(30px) saturate(1.5); backdrop-filter: blur(30px) saturate(1.5); border-top: 1px solid var(--win-line); transition: background-color .4s; }
.tb.clear .tb-bg { background: rgba(20, 20, 20, .38); }
.tb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tb-row { position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.tb a, .tb button { color: inherit; text-decoration: none; font: inherit; background: none; border: 0; padding: 0; cursor: default; }
.tb .i { width: 24px; height: 24px; }

.tb-apps { display: flex; align-items: center; gap: 4px; height: 100%; }
.tb-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 4px; transition: background-color .08s; }
.tb-btn:hover { background: var(--win-hover); }
.tb-btn:active { background: var(--win-press); }
.tb-btn:active .i, .tb-btn:active img { transform: scale(.88); }
.tb-btn img { width: 24px; height: 24px; }
.tb-btn .i, .tb-btn img { transition: transform .12s; }
.tb-btn.open::after { content: ""; position: absolute; bottom: 1px; left: 50%; width: 6px; height: 3px; margin-left: -3px; border-radius: 2px; background: rgba(255, 255, 255, .55); transition: width .2s, margin .2s, background-color .2s; }
.tb-btn.focus { background: rgba(255, 255, 255, .06); }
.tb-btn.focus::after { width: 16px; margin-left: -8px; background: var(--win-accent); }
.tb-start .i { color: #4CC2FF; }
.tb-search { display: flex; align-items: center; gap: 10px; width: 216px; height: 34px; margin: 0 4px; padding: 0 14px; border-radius: 17px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .09); color: var(--win-sub); }
.tb-search:hover { background: rgba(255, 255, 255, .1); }
.tb-search .i { width: 16px; height: 16px; color: #fff; }
.tb-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: 13px var(--f-win); padding: 0; }
.tb-search input::placeholder { color: var(--win-sub); }
.tb-search:focus-within { border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); }

/* MusicBar's player, in the empty space on the left of the taskbar */
.tb-np { display: flex; align-items: center; gap: 10px; height: 100%; padding-left: 12px; min-width: 0; }
.tb-art { width: 32px; height: 32px; border-radius: 4px; overflow: hidden; flex: none; background: #333; }
.tb-art img { width: 100%; height: 100%; object-fit: cover; }
.tb-text { min-width: 0; display: grid; line-height: 1.3; }
.tb-title { font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-lyric { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255, 255, 255, .5); }
.tb-lyric .w { transition: color .15s; }
.tb-lyric .w.on { color: #fff; }
.tb-lyric .w.now { color: var(--win-accent); }
.tb-ctl { display: flex; gap: 0; flex: none; }
.tb-ctl button { width: 30px; height: 32px; display: grid; place-items: center; border-radius: 4px; }
.tb-ctl button:hover { background: var(--win-hover); }
.tb-ctl .i { width: 16px; height: 16px; }

.tb-tray { display: flex; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; padding-right: 0; }
.tb-tbtn { height: 40px; min-width: 32px; padding: 0 8px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 4px; }
.tb-tbtn:hover { background: var(--win-hover); }
.tb-tbtn .i { width: 16px; height: 16px; }
.tb-tbtn img { width: 16px; height: 16px; }
/* the input-language indicator, as Windows shows it when there is more than one: VIE / VN, ENG / US */
.tb-ime { flex-direction: column; gap: 0; line-height: 15px; font-size: 11.5px; text-decoration: none; }
.tb-ime small { font-size: 11.5px; }
.tb-tbtn.tb-clock { display: block; text-align: right; line-height: 16px; font-size: 12px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.tb-clock br { display: block; }
.tb-desk { width: 12px; height: 100%; display: block; position: relative; }
.tb-desk::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 1px; background: rgba(255, 255, 255, .28); }
.tb-badge { position: relative; }
.tb-badge[data-n]::after { content: attr(data-n); position: absolute; top: 4px; right: 2px; min-width: 14px; height: 14px; border-radius: 7px; background: var(--win-accent); color: #000; font-size: 9px; font-weight: 700; line-height: 14px; text-align: center; padding: 0 3px; }

/* tooltips, like Windows': a short wait, then the label above the button */
[data-tip] { position: relative; }
[data-tip]::before {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 9px;
  background: #2B2B2B;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  color: #fff;
  font: 12px var(--f-win);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .1s;
}
[data-tip]:hover::before { opacity: 1; transition-delay: .55s; }
.tb-tray [data-tip]::before { left: auto; right: 0; transform: none; }

/* flyouts: Start, quick settings, notifications, hidden icons */
.fly {
  position: fixed;
  bottom: calc(var(--tb-h) + 12px);
  z-index: 61;
  background: var(--win-flyout);
  -webkit-backdrop-filter: blur(60px) saturate(1.6);
  backdrop-filter: blur(60px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .38);
  color: #fff;
  font: 13px/1.4 var(--f-win);
  font-stretch: 100%;
  opacity: 0;
  transform: translateY(16px);
  visibility: hidden;
  transition: opacity .18s ease-out, transform .26s cubic-bezier(.1, .9, .2, 1), visibility 0s .26s;
}
.fly.on { opacity: 1; transform: none; visibility: visible; transition: opacity .18s ease-out, transform .26s cubic-bezier(.1, .9, .2, 1), visibility 0s; }
.fly a, .fly button { color: inherit; text-decoration: none; background: none; border: 0; font: inherit; cursor: default; }
.fly h4 { margin: 0; font: 600 14px var(--f-win); }

.start { left: 50%; width: min(640px, calc(100vw - 24px)); margin-left: max(-320px, calc(-50vw + 12px)); }
.start-search { margin: 24px 32px 8px; display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 14px; border-radius: 18px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08); border-bottom-color: var(--win-accent); }
.start-search .i { width: 16px; height: 16px; }
.start-search input { flex: 1; background: none; border: 0; outline: 0; color: #fff; font: 13px var(--f-win); }
.start-search input::placeholder { color: var(--win-sub); }
.start-sec { padding: 16px 32px 8px; }
.start-sec header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.start-sec header a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 4px; background: rgba(255, 255, 255, .06); }
.start-sec header a .rot { width: 10px; height: 10px; transform: rotate(90deg); }
.start-sec header a:hover { background: rgba(255, 255, 255, .1); }
.pins { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.pin { display: grid; justify-items: center; gap: 6px; padding: 12px 4px 8px; border-radius: 4px; font-size: 12px; text-align: center; }
.pin:hover { background: var(--win-hover); }
.pin .i, .pin img { width: 32px; height: 32px; }
.pin .tile { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; }
.pin .tile .i { width: 22px; height: 22px; }
.recs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.rec { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 4px; }
.rec:hover { background: var(--win-hover); }
.rec .thumb { width: 36px; height: 36px; border-radius: 4px; overflow: hidden; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.rec .thumb img { width: 100%; height: 100%; object-fit: cover; }
.rec small { display: block; color: var(--win-sub); font-size: 12px; }
.start-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 12px 48px; background: rgba(0, 0, 0, .18); border-top: 1px solid rgba(255, 255, 255, .06); border-radius: 0 0 8px 8px; }
.start-foot .me { display: flex; gap: 12px; align-items: center; padding: 6px 10px; border-radius: 4px; }
.start-foot .me img { width: 32px; height: 32px; border-radius: 50%; }
.start-foot button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 4px; }
.start-foot button:hover, .start-foot .me:hover { background: var(--win-hover); }
.start-foot .i { width: 18px; height: 18px; }

.qs { right: 12px; width: 360px; padding: 20px 20px 0; }
.qs-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; }
.qs-tile { display: grid; gap: 8px; justify-items: center; text-align: center; font-size: 12px; }
.qs-tile button, .qs-tile .qs-btn { width: 100%; height: 50px; border-radius: 6px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); display: grid; place-items: center; }
.qs-tile button:hover, .qs-tile .qs-btn:hover { background: rgba(255, 255, 255, .12); }
.qs-tile button[aria-pressed="true"] { background: var(--win-accent); color: #000; border-color: transparent; }
.qs-tile .i { width: 18px; height: 18px; }
.qs-slider { display: grid; grid-template-columns: 24px 1fr 32px; gap: 10px; align-items: center; margin: 22px 0 16px; }
.qs-slider .i { width: 18px; height: 18px; }
.qs-slider input { width: 100%; accent-color: var(--win-accent); }
.qs-foot { display: flex; justify-content: space-between; align-items: center; margin: 0 -20px; padding: 10px 20px; background: rgba(0, 0, 0, .18); border-top: 1px solid rgba(255, 255, 255, .06); border-radius: 0 0 8px 8px; color: var(--win-sub); font-size: 12px; }

.nc { right: 12px; width: 360px; padding: 12px; display: grid; gap: 8px; max-height: calc(100dvh - var(--tb-h) - 40px); overflow: auto; }
.nc > header { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 6px; }
.nc > header button { font-size: 12px; padding: 4px 8px; border-radius: 4px; }
.nc > header button:hover { background: var(--win-hover); }
.note { display: block; padding: 14px 16px; border-radius: 6px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06); }
.note:hover { background: rgba(255, 255, 255, .08); }
.note .app { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--win-sub); margin-bottom: 8px; }
.note .app img { width: 16px; height: 16px; }
.note b { display: block; font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.note span { color: var(--win-sub); }
.nc .cal { padding: 14px 16px 6px; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 4px; font-size: 14px; font-weight: 600; }

.hidden-icons { width: auto; padding: 6px; display: flex; gap: 2px; }
.hidden-icons a, .hidden-icons button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 4px; }
.hidden-icons a:hover, .hidden-icons button:hover { background: var(--win-hover); }
.hidden-icons .i { width: 16px; height: 16px; }

/* toasts, like Windows notifications, bottom right above the taskbar */
.toasts { position: fixed; right: 12px; bottom: calc(var(--tb-h) + 12px); z-index: 62; display: grid; gap: 10px; width: min(364px, calc(100vw - 24px)); }
.toast { background: var(--win-flyout); -webkit-backdrop-filter: blur(60px); backdrop-filter: blur(60px); border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; box-shadow: 0 8px 32px rgba(0, 0, 0, .38); color: #fff; font: 13px/1.45 var(--f-win); padding: 14px 16px 16px; animation: toast-in .4s cubic-bezier(.1, .9, .2, 1); }
.toast.out { animation: toast-out .25s ease-in forwards; }
.toast .app { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--win-sub); margin-bottom: 10px; }
.toast .app img { width: 16px; height: 16px; }
.toast .app button { margin-left: auto; width: 28px; height: 24px; display: grid; place-items: center; border-radius: 4px; background: none; border: 0; color: #fff; }
.toast .app button:hover { background: var(--win-hover); }
.toast .app .i { width: 12px; height: 12px; }
.toast b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.toast .acts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 14px; }
.toast .acts a, .toast .acts button { display: grid; place-items: center; height: 32px; border-radius: 4px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); color: #fff; text-decoration: none; font: 13px var(--f-win); }
.toast .acts a:first-child { background: var(--win-accent); color: #000; border-color: transparent; }
@keyframes toast-in { from { transform: translateX(110%); } to { transform: none; } }
@keyframes toast-out { to { transform: translateX(110%); opacity: 0; } }

/* MusicBar on the taskbar: the real render of the look it wears (a video), or the page's own drawing of
   it when there is no render; the face sits by the player. */
.tb-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, .38) 280px, #000 400px); mask-image: linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, .38) 280px, #000 400px); }
.tb-face { --s: .78; margin-right: 2px; }
.tb-face .eye { top: 2px; }

@media (max-width: 760px) {
  .tb-np { padding-left: 6px; gap: 0; }
  .tb-text, .tb-ctl .prev, .tb-ctl .next { display: none; }
  .tb-art { display: none; }
  .tb-search { display: none; }
  .tb-btn.wide-only, .tb-tray .wide-only { display: none; }
  .tb-clock { padding: 0 6px; }
  .pins { grid-template-columns: repeat(4, 1fr); }
  .recs { grid-template-columns: 1fr; }
  .start-sec { padding: 12px 16px 6px; }
  .start-search { margin: 16px 16px 6px; }
  .start-foot { padding: 10px 16px; }
  .qs, .nc { right: 8px; width: calc(100vw - 16px); }
}
