@font-face {
  font-family: "Golos";
  src: url("./assets/golos.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Golos";
  src: url("./assets/golos-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  color-scheme: dark;
  font-family: "Golos", system-ui, sans-serif;
  color: #eff3e9;
  background: #131917;
  --muted: #a7b3a8;
  --green: #a6e67e;
  --border: #313d34;
  --surface: #1b241e;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 10; transform: translateY(-150%); background: var(--green); padding: 12px; color: #182512; }
.skip:focus { transform: none; }
.topbar { border-bottom: 1px solid #2b362e; background: #161e19; }
.topbar-inner, .wrap { width: min(1160px, calc(100% - 72px)); margin-inline: auto; }
.topbar-inner { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; width: fit-content; font-size: 22px; font-weight: 800; letter-spacing: -.045em; }
.brand img { image-rendering: pixelated; flex: none; }
.brand span span { color: var(--green); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 10px 13px; border: 1px solid transparent; border-radius: 5px; color: var(--muted); font-size: 14px; font-weight: 650; white-space: nowrap; }
.nav a:hover { color: #fff; background: #202d24; }
.nav a[aria-current] { color: var(--green); background: #263a29; border-color: #3d5539; }
.button { min-height: 42px; border: 1px solid transparent; border-radius: 5px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 14px; font-weight: 750; }
.button-quiet { background: #202923; color: #dbe4d8; border-color: #37443a; }
.button-quiet:hover, .button-quiet[aria-pressed="true"] { background: #304432; border-color: #63875c; }
.settings { justify-self: end; white-space: nowrap; }
.settings > span:first-child { font-family: system-ui, sans-serif; font-size: 19px; line-height: 1; }
.wrap { padding-top: 28px; }
.hero {
  min-height: 340px;
  position: relative;
  display: flex;
  align-items: center;
  isolation: isolate;
  border: 1px solid #3c5542;
  border-radius: 9px;
  background: #1c3025 url("./assets/forest.webp") center 53% / cover no-repeat;
  overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #101c16 0%, #111f18ed 23%, #14251a99 43%, #17271915 67%); }
.hero-content { padding: 34px clamp(24px, 4.2vw, 58px) 39px; }
.hero-date { color: #d8e9ce; font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hero-date span { width: 8px; height: 8px; background: #a6e67e; box-shadow: 0 0 12px #b8ff807d; }
.hero h1 { font-size: clamp(47px, 5.15vw, 75px); line-height: .99; letter-spacing: -.045em; font-weight: 830; text-shadow: 0 5px #101713; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero-description { color: #d3e0d2; font-size: 17px; font-weight: 500; margin: 16px 0 21px; }
.button-green { background: var(--green); color: #1b2b13; border-color: #beeaa4; box-shadow: 0 3px #5e993f; }
.button-green:hover { background: #c0f2a2; }
.button-green:active { transform: translateY(2px); box-shadow: 0 1px #5e993f; }
.button-green span { font-size: 17px; }
.section { margin-top: 31px; scroll-margin-top: 22px; }
.section-title { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; font-size: 24px; font-weight: 780; letter-spacing: -.032em; }
.marker { width: 12px; height: 12px; background: #89c760; box-shadow: inset -3px -3px #517c3c; }
.areas, .shortcuts { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.area, .category-head { --light: #b2e990; --ink: #253c25; --edge: #3a593b; --dark: #1c2920; }
[data-theme="learning"] { --light: #f2ce83; --ink: #473921; --edge: #675338; --dark: #2b281e; }
[data-theme="watch"] { --light: #d7bbfa; --ink: #392c49; --edge: #534364; --dark: #262232; }
.area {
  min-height: 153px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-bottom-width: 3px;
  border-radius: 8px;
  background: linear-gradient(120deg, var(--dark), var(--ink));
  padding: 19px 16px 17px 19px;
  display: flex;
  align-items: end;
  transition: transform .18s, border-color .18s;
}
.area::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: conic-gradient(from 90deg at 1px 1px, transparent 25%, #ffffff0c 0) 0 0/20px 20px;
  mask-image: linear-gradient(100deg, transparent 4%, #000 82%);
}
.area:hover { border-color: var(--light); transform: translateY(-3px); }
.area-art { position: absolute; top: 13px; right: 19px; width: 80px; height: 80px; image-rendering: pixelated; filter: drop-shadow(3px 6px #0005); transition: transform .18s; }
.area:hover .area-art { transform: translateY(-3px) rotate(-4deg); }
.area-copy { display: grid; gap: 5px; min-width: 0; margin-right: 38px; }
.area h3 { color: var(--light); font-size: clamp(18px, 2vw, 24px); font-weight: 800; letter-spacing: -.03em; }
.area p { font-size: 13px; color: #d0d7cc; line-height: 1.35; }
.area-arrow { position: absolute; right: 16px; bottom: 17px; display: grid; place-items: center; width: 32px; height: 32px; background: var(--ink); border: 1px solid var(--edge); border-radius: 4px; color: var(--light); font-size: 19px; }
.shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { display: flex; min-width: 0; min-height: 62px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.tile:hover, .tile:focus-within { border-color: #76906f; }
.tile-main, .tile-add { display: flex; flex: 1; min-width: 0; align-items: center; gap: 10px; padding: 10px 11px; }
.tile-main { border-radius: inherit; }
.tile-add { min-height: 62px; width: 100%; background: #181f1b; color: #d3dfd0; border: 1px dashed #50674f; border-radius: 7px; text-align: left; font-weight: 720; }
.tile-add:hover { color: var(--green); border-color: var(--green); background: #202c22; }
.tile-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 4px; background: #273a2a; color: #bdeda4; }
.tile-icon img { width: 28px; height: 28px; image-rendering: pixelated; }
.tile[data-theme="learning"] .tile-icon, .category-head[data-theme="learning"] { background-color: #3d3222; }
.tile[data-theme="watch"] .tile-icon, .category-head[data-theme="watch"] { background-color: #342942; }
.tile .tile-icon.tile-icon-brand { background: #17161a; }
.tile-icon-brand img { object-fit: contain; image-rendering: auto; }
.tile-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.tile-name, .tile-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-name { font-size: 14px; font-weight: 740; }
.tile-host { font-size: 12px; color: var(--muted); }
.tile-arrow { color: #a8b7a7; font-size: 16px; flex: none; }
.tile-add .tile-icon { font-size: 23px; }
.icon-button { display: grid; place-items: center; flex: none; width: 38px; min-height: 38px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--green); font-size: 21px; }
.icon-button:hover { background: #304432; border-color: #4d674b; }
.tile .icon-button { align-self: center; margin-right: 4px; }
.footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); border-top: 1px solid var(--border); margin-top: 35px; padding: 17px 0 23px; font-size: 12px; }
.footer span:first-child { font-weight: 750; }
.category { min-height: 430px; }
.back { display: inline-flex; gap: 8px; color: var(--green); font-size: 14px; font-weight: 700; margin: 3px 0 20px; }
.back:hover { text-decoration: underline; }
.category-head { display: flex; align-items: center; gap: 19px; background: var(--ink); border: 1px solid var(--edge); border-radius: 8px; padding: 20px clamp(14px, 3vw, 30px); margin-bottom: 20px; }
.category-head img { width: clamp(55px, 9vw, 74px); height: auto; image-rendering: pixelated; }
.category-head h1 { font-size: clamp(29px, 4vw, 50px); letter-spacing: -.065em; color: var(--light); }
.category-head p { color: #e0e6da; margin-top: 5px; }
dialog { width: min(470px, calc(100% - 26px)); max-height: calc(100dvh - 26px); overflow: auto; border: 1px solid #576b54; border-radius: 9px; background: #222e25; color: #eff3e9; padding: clamp(18px, 5vw, 28px); }
dialog::backdrop { background: #080d0bc9; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -5px -5px 14px 0; }
.dialog-head h2 { font-size: 25px; letter-spacing: -.045em; }
.dialog-head .icon-button { font-size: 26px; }
dialog label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; margin: 13px 0 0; }
dialog input:not([type="checkbox"]), dialog select { width: 100%; min-height: 43px; padding: 9px 11px; color: #eff3e9; background: #131c16; border: 1px solid #536253; border-radius: 5px; }
dialog input::placeholder { color: var(--muted); }
dialog small { color: var(--muted); display: block; margin-top: 7px; line-height: 1.4; }
dialog .check { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
dialog input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--green); }
.dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 23px; }
.dialog-actions .button-green { margin-left: auto; }
.button-danger { color: #ffbbb6; background: #422c2c; border-color: #704845; }
.button-danger:hover { background: #563434; }
.form-error { color: #ffbbb6; margin-top: 12px; font-size: 14px; line-height: 1.4; }
.status { position: fixed; z-index: 3; right: 20px; bottom: 18px; max-width: calc(100% - 40px); background: #334633; color: #f0f8e8; border: 1px solid #678660; border-radius: 5px; padding: 11px 14px; font-size: 14px; }
.status:empty { clip-path: inset(100%); }
@media (max-width: 890px) {
  .topbar-inner, .wrap { width: calc(100% - 40px); }
  .shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area p { max-width: 170px; }
}
@media (max-width: 650px) {
  .topbar-inner, .wrap { width: calc(100% - 28px); }
  .topbar-inner { grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 9px 0; }
  .nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
  .nav a { text-align: center; padding: 8px 3px; font-size: clamp(11px, 3.2vw, 14px); }
  .settings { min-height: 37px; padding-inline: 9px; font-size: 12px; }
  .wrap { padding-top: 16px; }
  .hero { min-height: 313px; background-position: 62% center; }
  .hero::before { background: linear-gradient(90deg, #111e17ed, #14221983 68%, #14221928); }
  .hero h1 { font-size: clamp(35px, 10.2vw, 58px); }
  .hero-content { padding: 29px 19px 32px; }
  .hero-description { font-size: 15px; }
  .areas { grid-template-columns: 1fr; gap: 9px; }
  .area { min-height: 88px; align-items: center; padding: 11px 43px 11px 77px; }
  .area-art { width: 55px; height: 55px; right: auto; left: 12px; top: 50%; transform: translateY(-50%); }
  .area:hover .area-art { transform: translateY(-54%) rotate(-4deg); }
  .area-copy { margin: 0; }
  .area h3 { font-size: 19px; }
  .area p { max-width: none; }
  .area-arrow { right: 10px; bottom: auto; top: calc(50% - 16px); }
  .section { margin-top: 25px; }
  .section-title { font-size: 22px; margin-bottom: 11px; }
  .shortcuts { gap: 8px; }
  .tile-main, .tile-add { gap: 6px; padding-inline: 7px; }
  .tile-icon { width: 29px; height: 29px; }
  .tile-icon img { width: 23px; height: 23px; }
  .tile .icon-button { width: 30px; margin-right: 1px; }
  .tile-name, .tile-add { font-size: 13px; }
  .tile-arrow { display: none; }
  .footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
#quick-title { scroll-margin-top: 22px; }

.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(43%, 188px), 1fr));
}
.category-grid .tile, .category-grid .tile-add {
  aspect-ratio: 1;
  border-radius: 9px;
}
.category-grid .tile { position: relative; min-height: 0; border-color: #445247; }
.category-grid .tile[data-theme="learning"] { --cover-glow: #5b4d37; --cover-base: #322b22; }
.category-grid .tile[data-theme="watch"] { --cover-glow: #50415e; --cover-base: #2c2537; }
.category-grid .tile:hover, .category-grid .tile:focus-within { border-color: var(--green); }
.category-grid .tile-main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-items: end;
  padding: clamp(10px, 1.5vw, 16px);
}
.shortcut-cover {
  position: absolute;
  z-index: -1;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 30%, var(--cover-glow, #405940), var(--cover-base, #233025) 68%);
}
.shortcut-cover-symbol {
  width: 46%;
  margin-bottom: 25%;
  border-radius: 9px;
  filter: drop-shadow(2px 4px #121c1488);
}
.shortcut-cover-symbol.pixel-symbol { image-rendering: pixelated; }
.shortcut-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .22s;
}
.shortcut-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 47%, #0b100e99 73%, #0b100ef7);
}
.category-grid .tile-main:hover .shortcut-cover-image { transform: scale(1.045); }
.category-grid .tile-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #fcfdf9;
  font-size: clamp(15px, 1.55vw, 20px);
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 1px 3px #000;
}
.category-grid .tile-host {
  color: #e0ecdc;
  text-shadow: 0 1px 3px #000;
}
.category-grid .tile-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #ffffff42;
  border-radius: 4px;
  background: #101a14bb;
  color: #e8f5e4;
}
.category-grid .tile .icon-button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 38px;
  margin: 0;
  border-color: #6c8869;
  background: #17241af2;
}
.category-grid .tile .icon-button:hover { background: #304432; }
.category-grid .tile-add {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 10px;
  font-size: clamp(13px, 1.6vw, 16px);
}
.category-grid .tile-add .tile-icon { width: 42px; height: 42px; }

.torch-light { display: none; }
@media (any-hover: hover) and (any-pointer: fine) {
  :root {
    --torch-cursor: url("./assets/torch-cursor.png") 12 3;
    cursor: var(--torch-cursor), auto;
  }
  a, button, select, input[type="checkbox"], .check {
    cursor: var(--torch-cursor), pointer;
  }
  input:not([type="checkbox"]), textarea, [contenteditable]:not([contenteditable="false"]) {
    cursor: text;
  }
}
@media (any-hover: hover) and (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
  .torch-light {
    display: block;
    position: fixed;
    z-index: 6;
    inset: 0 auto auto 0;
    width: 76px;
    height: 76px;
    translate: -50% -50%;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle, #ffce8255, #ffac3d23 42%, transparent 70%);
    transition: opacity .2s ease-out;
  }
  .torch-light.is-visible { opacity: 1; }
}
