/* Desktop extras: Paint, the notification centre, the calendar under the
   clock and the «Сейчас» widget (Twitch + weather, with the city picker). */

/* ─── Paint ───────────────────────────────────────────────── */
.pt { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--surface-2); }
.pt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pt-group { display: flex; align-items: center; gap: 4px; }
.pt-group[hidden] { display: none; }
.pt-tool { display: grid; justify-items: center; gap: 1px; min-width: 56px; padding: 4px 6px; border-radius: 8px; border: 1px solid transparent; font-size: 20px; line-height: 1; transition: background-color 120ms ease, border-color 120ms ease; }
.pt-tool small { font-size: 10.5px; color: var(--text-3); }
.pt-tool.is-on { background: var(--accent-soft); border-color: var(--accent-line); }
.pt-tool.is-on small { color: var(--text); }
@media (hover: hover) and (pointer: fine) { .pt-tool:not(.is-on):hover, .pt-stamp:hover { background: var(--surface-3); } }
.pt-size { gap: 8px; font-size: 12px; color: var(--text-3); }
.pt-size input { width: 110px; accent-color: var(--accent); }
.pt-size-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text); flex: none; }
.pt-colors { gap: 3px; flex-wrap: wrap; max-width: 420px; }
.pt-color { width: 22px; height: 22px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, 0.15); transition: transform 120ms var(--ease-out); }
.pt-color.is-on { border-color: #fff; transform: scale(1.12); box-shadow: 0 0 0 2px var(--accent); }
.pt-custom { position: relative; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-3); cursor: pointer; overflow: hidden; }
.pt-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pt-stamp { width: 34px; height: 34px; border-radius: 8px; font-size: 20px; border: 1px solid transparent; }
.pt-stamp.is-on { background: var(--accent-soft); border-color: var(--accent-line); }
.pt-actions { margin-left: auto; gap: 6px; }
.pt-actions .btn { height: 34px; }
.pt-stage { min-height: 0; display: grid; place-items: center; padding: 14px; overflow: auto; background: repeating-conic-gradient(#1f1826 0 25%, #1a1420 0 50%) 0 0 / 20px 20px; }
.pt-canvas { display: block; max-width: 100%; max-height: 100%; aspect-ratio: 1280 / 800; background: #fff; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.9); cursor: crosshair; touch-action: none; }
.pt-canvas[data-tool='fill'] { cursor: cell; }
.pt-canvas[data-tool='stamp'] { cursor: copy; }
.pt-status { display: flex; gap: 18px; margin: 0; padding: 6px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pt-hint { margin-left: auto; }

/* ─── the bell, the clock, Twitch live in the tray ────────── */
.tray-bell { position: relative; }
.tray-badge { position: absolute; top: 5px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 700 10px/1 var(--font-ui); box-shadow: 0 0 0 2px var(--bar-bg); }
.clock.is-button { cursor: pointer; transition: background-color 120ms ease; }
.clock.is-button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .clock.is-button:hover { background: var(--surface-3); } }
.tray-twitch.is-live { color: #fff; }
.tray-twitch.is-live .ico { color: #ff3350; filter: drop-shadow(0 0 6px #ff3350); }

/* ─── notification centre and calendar flyouts ────────────── */
.nc, .cal {
  position: absolute; right: 10px; bottom: calc(var(--taskbar-h) + 10px); z-index: 800;
  width: min(370px, calc(100vw - 20px)); max-height: calc(100% - var(--taskbar-h) - 20px);
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-win);
  transform-origin: 100% 100%; transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out);
}
.nc[data-state='closed'], .cal[data-state='closed'] { opacity: 0; transform: translateY(12px) scale(0.97); pointer-events: none; }
.nc { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.nc-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.nc-head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.nc-clear { font-size: 12.5px; color: var(--accent-2); background: none; border: 0; cursor: pointer; }
.nc-list { min-height: 80px; overflow: auto; overscroll-behavior: contain; padding: 0 8px 8px; display: grid; align-content: start; gap: 6px; }
.nc-item { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; text-align: left; background: var(--surface-2); border: 1px solid var(--line); transition: border-color 120ms ease; }
.nc-item.is-new { border-color: var(--accent-line); }
.nc-item.is-new::before { content: ''; position: absolute; left: 5px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .nc-item:hover { border-color: var(--line-strong); background: var(--surface-3); } }
.nc-ico { font-size: 22px; line-height: 1.2; text-align: center; }
.nc-ico .badge-art { display: block; width: 30px; height: 30px; margin: 0 auto; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.nc-text { display: grid; gap: 2px; min-width: 0; }
.nc-text b { font-size: 13.5px; font-weight: 650; }
.nc-text span { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.nc-item small { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.nc-empty { margin: 20px 0; text-align: center; color: var(--text-3); font-size: 13px; }
.nc-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.nc-tile { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 10px; font-size: 11px; color: var(--text-2); background: var(--surface-3); border: 1px solid var(--line); cursor: pointer; transition: background-color 120ms ease; }
.nc-tile .ico { font-size: 18px; }
.nc-tile[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.cal { padding: 14px 16px 16px; overflow: auto; overscroll-behavior: contain; }
.cal-now { display: grid; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cal-now b { font-size: 34px; font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.cal-now span { margin-top: 4px; font-size: 13px; color: var(--accent-2); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.cal-nav { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--text-2); background: none; border: 0; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .cal-nav:hover { background: var(--surface-3); } }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-wd { font-size: 11px; color: var(--text-3); text-align: center; padding-bottom: 4px; }
.cal-day { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-2); background: none; border: 1px solid transparent; cursor: pointer; }
.cal-day.is-empty { cursor: default; }
.cal-day.has-films { color: var(--text); font-weight: 650; background: var(--accent-soft); }
.cal-day i { position: absolute; bottom: 3px; left: 50%; min-width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); font: 700 8px/5px var(--font-ui); font-style: normal; color: transparent; }
.cal-day.is-today { border-color: var(--accent); }
.cal-day.is-picked { background: var(--accent); color: var(--accent-ink); }
.cal-day.is-picked i { background: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .cal-day:not(.is-empty):not(.is-picked):hover { background: var(--surface-3); } }
.cal-sum { margin: 10px 0 0; font-size: 12px; color: var(--text-3); }
.cal-list { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.cal-list h3 { margin: 0 0 4px; font-size: 13px; font-weight: 650; }
.cal-film { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; text-align: left; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.cal-film b { font-size: 13.5px; }
.cal-film small { font-size: 12px; color: var(--text-3); }
@media (hover: hover) and (pointer: fine) { .cal-film:hover { border-color: var(--accent-line); } }
.cal-empty { margin: 0; font-size: 12.5px; color: var(--text-3); }

/* ─── the «Сейчас» widget ─────────────────────────────────── */
.now-widget { width: 300px; display: grid; gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line-strong); border: 1px solid var(--line-strong); box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.9); }
.now-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; text-align: left; background: rgba(14, 10, 18, 0.78); transition: background-color 140ms ease; }
@media (hover: hover) and (pointer: fine) { .now-row:hover { background: rgba(30, 22, 36, 0.9); } }
.now-text { display: grid; gap: 1px; min-width: 0; }
.now-text b { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-text small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-dot { justify-self: center; width: 12px; height: 12px; border-radius: 50%; background: #6e6378; box-shadow: 0 0 0 4px rgba(110, 99, 120, 0.18); }
.now-live.is-live .now-dot { background: #ff3350; box-shadow: 0 0 0 4px rgba(255, 51, 80, 0.2), 0 0 12px #ff3350; animation: pulse 1.6s ease-in-out infinite; }
.now-live.is-live b { color: #ff8a9a; }
.now-emoji { font-size: 24px; text-align: center; line-height: 1; }
@media (max-width: 759px) { .now-widget { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .now-live.is-live .now-dot { animation: none; } }

/* ─── v73: the city picker under the weather ──────────────── */
.wx-pick { position: fixed; z-index: 880; width: 340px; max-height: calc(100vh - 24px); overflow-y: auto; display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(18, 13, 22, 0.97); border: 1px solid var(--line-strong); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.85); transform-origin: center right; transition: opacity 160ms ease, transform 200ms var(--ease-out), visibility 0s linear 200ms; }
.wx-pick[data-state='closed'] { opacity: 0; transform: translateY(-6px) scale(0.98); visibility: hidden; pointer-events: none; }
.wx-pick[data-state='open'] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.wx-now { margin: 0; font-size: 13.5px; line-height: 1.4; }
.wx-now small { display: block; margin-top: 2px; color: var(--text-3); font-size: 12px; }
.wx-field { display: grid; gap: 5px; }
.wx-field span { font-size: 12px; font-weight: 650; color: var(--text-2); }
.wx-field input { height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-strong); background: #0d0910; color: var(--text); font: inherit; font-size: 14px; outline: none; }
.wx-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 79, 154, 0.25); }
.wx-list { display: grid; gap: 2px; max-height: 210px; overflow-y: auto; }
.wx-list:empty { display: none; }
.wx-city { display: grid; gap: 1px; padding: 7px 10px; border-radius: 8px; text-align: left; }
.wx-city b { font-size: 13.5px; font-weight: 650; }
.wx-city small { font-size: 12px; color: var(--text-3); }
.wx-city:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .wx-city:hover { background: var(--surface-3); } }
.wx-msg { margin: 4px 2px; font-size: 12.5px; color: var(--text-3); }
.wx-foot { display: flex; justify-content: space-between; gap: 8px; }
.wx-foot button { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; color: var(--text-2); border: 1px solid var(--line); }
.wx-foot .wx-close { margin-left: auto; color: var(--text); background: var(--surface-3); }
@media (hover: hover) and (pointer: fine) { .wx-foot button:hover { color: var(--text); border-color: var(--line-strong); } }
.wx-note { margin: 0; font-size: 11.5px; color: var(--text-3); }
@media (max-width: 759px) { .wx-pick { width: auto; } }
@media (prefers-reduced-motion: reduce) { .wx-pick { transition: none; } }
