/* CALENDE.RU — дизайн-система v9: градиентные плитки и яркие акценты (по мотивам class.su), оранжевые CTA и мягкие блики (по мотивам amssoft). */
:root {
  --bg: #f1f5fd; --bg2: #e6edfb; --card: #ffffff; --ink: #14213d; --muted: #5c6a89; --line: #dde5f5;
  --teal: #17b9c9; --blue: #2563d9; --violet: #7a45e5; --orange: #ff7a1a; --pink: #ee4f8f; --green: #23a74a;
  --red: #e5484d; --yellow: #f2b01e;
  --grad: linear-gradient(135deg, #17b9c9 0%, #2b6fe0 52%, #7a45e5 100%);
  --grad-alt: linear-gradient(135deg, #ff9a2e 0%, #ff5a1f 100%);
  --grad-green: linear-gradient(135deg, #3dcf5d 0%, #1fa83c 100%);
  --hero: linear-gradient(115deg, #1fa5c9 0%, #3a63e6 42%, #8a3fe0 78%, #d6479a 100%);
  --radius: 18px; --radius-sm: 12px; --shadow: 0 2px 4px rgba(30, 50, 110, .04), 0 10px 28px rgba(30, 50, 110, .08); --shadow-lg: 0 18px 44px rgba(30, 50, 130, .18);
  --side: 262px; --gap: clamp(14px, 1.6vw, 24px);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --slab: "Roboto Slab", "Rockwell", "Bookman Old Style", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1226; --bg2: #19224a; --card: #151c3a; --ink: #e8ecfa; --muted: #98a3c7; --line: #252e55; --blue: #6f9bff; --shadow: 0 10px 28px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 44px rgba(0, 0, 0, .5); color-scheme: dark; }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: radial-gradient(900px 420px at 85% -5%, color-mix(in srgb, var(--violet) 12%, transparent) 0%, transparent 70%), radial-gradient(800px 400px at 0% 10%, color-mix(in srgb, var(--teal) 12%, transparent) 0%, transparent 70%), var(--bg); min-height: 100vh; }
body.no-scroll { overflow: hidden; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 2.2vw + 1rem, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 1vw + 1rem, 1.7rem); font-weight: 750; }
h3, .h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .hint { color: var(--muted); font-size: .88rem; }
.mt { margin-top: 1.6em; } .lead { font-size: 1.12rem; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---- каркас ---- */
.content { padding: var(--gap); flex: 1; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.logo-mark { display: inline-flex; filter: drop-shadow(0 4px 8px rgba(27, 134, 214, .3)); }
.logo-text { font-weight: 800; font-size: 1.28rem; letter-spacing: .02em; }
.logo-dot { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.searchbox { position: relative; width: 100%; justify-self: center; }
.searchbox input { width: 100%; height: 48px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); padding: 0 20px 0 46px; font: inherit; color: var(--ink); box-shadow: var(--shadow); }
.searchbox input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.searchicon { position: absolute; left: 18px; top: 50%; transform: translateY(-52%); font-size: 1.3rem; color: var(--muted); pointer-events: none; }
.searchresults { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; max-height: 70vh; overflow-y: auto; z-index: 50; }
.searchresults.open { display: block; }
.searchresults a { display: block; padding: 10px 18px; color: var(--ink); border-bottom: 1px solid var(--line); }
.searchresults a:last-child { border-bottom: 0; }
.searchresults a:hover, .searchresults a.active { background: var(--bg2); text-decoration: none; }
.searchresults small { display: block; color: var(--muted); }
.sr-empty { padding: 14px 18px; color: var(--muted); }

/* ---- кнопки ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none !important; transition: transform .15s, box-shadow .15s, filter .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-gradient { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(27, 134, 214, .32); }
.btn-gradient:hover { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(27, 134, 214, .4); }
.btn-gradient-alt { background: var(--grad-alt); color: #fff; box-shadow: 0 8px 20px rgba(255, 111, 145, .32); }
.btn-soft { background: color-mix(in srgb, var(--blue) 12%, var(--card)); color: var(--blue); }
.btn-white { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.roundbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 1.3rem; box-shadow: var(--shadow); }
.roundbtn:hover { background: var(--grad); color: #fff; text-decoration: none; }
.roundbtn.disabled { opacity: .35; pointer-events: none; }

/* ---- карточки и секции ---- */
.section { margin-bottom: 28px; }
.narrow-wide { max-width: 1120px; } .narrow { max-width: 560px; } .prose { max-width: 760px; }
.kicker, .eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.section-intro { color: var(--muted); max-width: 70ch; }
.panel, .widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: var(--gap); }
.panelhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panelhead h2 { margin: 0; }
.widget-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.widget-head h3 { margin: 0; }
.widget-more { margin-top: 10px; font-size: .92rem; font-weight: 600; }
.emoji-box { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: color-mix(in srgb, var(--blue) 14%, var(--card)); font-size: 1.15rem; flex: none; }
.emoji-box.green { background: color-mix(in srgb, var(--green) 20%, var(--card)); } .emoji-box.orange { background: color-mix(in srgb, var(--orange) 24%, var(--card)); }
.emoji-box.blue { background: color-mix(in srgb, var(--blue) 18%, var(--card)); } .emoji-box.violet { background: color-mix(in srgb, var(--violet) 18%, var(--card)); }
.widget-error { opacity: .7; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: var(--gap); align-items: start; }
.col-main, .col-aside { min-width: 0; }
.widgets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--gap); }
.widgets-grid .widget { margin-bottom: 0; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--gap); margin: 18px 0; }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); color: var(--ink); }
.info-card h3 { margin-bottom: 6px; } .info-card p { color: var(--muted); margin: 0; font-size: .94rem; }
.linkcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.info-card .num { display: inline-block; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.4rem; }
.stage small { color: var(--violet); font-weight: 700; } .stage { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.tag { display: inline-block; font-size: .76rem; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--bg2); color: var(--muted); white-space: nowrap; }
.tag-green { background: color-mix(in srgb, var(--green) 18%, var(--card)); color: #0e8a72; } .tag-yellow { background: color-mix(in srgb, var(--yellow) 24%, var(--card)); color: #9a6b00; } .tag-red { background: color-mix(in srgb, var(--red) 16%, var(--card)); color: var(--red); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--bg2); color: var(--ink); font-weight: 600; font-size: .9rem; border: 1px solid transparent; }
.pill-link:hover { background: var(--grad); color: #fff; text-decoration: none; }
.callout { border-radius: var(--radius-sm); padding: 12px 16px; margin: 14px 0; border: 1px solid var(--line); background: var(--card); }
.callout.warning { background: color-mix(in srgb, var(--yellow) 18%, var(--card)); border-color: color-mix(in srgb, var(--yellow) 45%, var(--line)); }
.callout.ok { background: color-mix(in srgb, var(--green) 14%, var(--card)); border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.bullets { padding-left: 1.2em; } .bullets li { margin-bottom: .35em; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: var(--gap); align-items: center; padding: clamp(20px, 3vw, 44px); border-radius: 28px; background: linear-gradient(135deg, #d7f7f4 0%, #d9ecfb 55%, #e6e5fb 100%); border: 1px solid var(--line); margin-bottom: var(--gap); overflow: hidden; }
@media (prefers-color-scheme: dark) { .hero { background: linear-gradient(135deg, #12343a 0%, #12283f 55%, #1d2145 100%); } }
.hero h1 { font-size: clamp(1.8rem, 2.8vw + 1rem, 3.2rem); }
.hero p { color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.hero-art { background: var(--card); border-radius: 24px; padding: 16px; box-shadow: var(--shadow-lg); transform: rotate(1.5deg); }
.hero-art-head { display: flex; flex-direction: column; margin-bottom: 8px; } .hero-art-head b { font-size: 1.3rem; } .hero-art-head small { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); margin: 0 0 var(--gap); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.35rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: .88rem; }

/* ---- сетка календаря ---- */
.cgrid { width: 100%; }
.cgrid-head, .cgrid-body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cgrid-head { margin-bottom: 6px; }
.weekday { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.weekday.weekend { color: var(--red); }
.day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1.15; border-radius: 14px; background: var(--bg); color: var(--ink); font-weight: 650; transition: transform .12s, background .12s; }
a.day:hover { background: var(--bg2); transform: translateY(-1px); text-decoration: none; }
.day.outside { opacity: .38; } .day.weekend { color: var(--red); }
.day.holiday-off { background: color-mix(in srgb, var(--red) 12%, var(--card)); color: var(--red); }
.day.holiday .dots, .day .dots { position: absolute; bottom: 5px; display: flex; gap: 3px; height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.day.today { outline: 2px solid var(--teal); outline-offset: -2px; }
.day.selected { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(27, 134, 214, .35); }
.day.selected .dot { background: #fff; }
.day.has-personal::after, .day.has-work::after { content: ""; position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.day.has-work::after { background: var(--violet); }
.day.has-personal.has-work::before { content: ""; position: absolute; top: 6px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.day.has-personal.has-work::after { background: var(--violet); }
.day.empty { background: transparent; }
.cgrid-mini .day { aspect-ratio: 1; font-size: .78rem; border-radius: 8px; }
.cgrid-mini .cgrid-head, .cgrid-mini .cgrid-body { gap: 2px; }
.cgrid-mini .weekday { font-size: .68rem; }
/* производственный календарь и сменные графики */
.day.pc-off { background: color-mix(in srgb, var(--red) 16%, var(--card)); color: var(--red); }
.day.pc-work { background: color-mix(in srgb, var(--green) 20%, var(--card)); color: #0e8a72; }
.day.pc-short { background: color-mix(in srgb, var(--orange) 24%, var(--card)); color: #b4560f; }
.day.shift-on { background: var(--grad); color: #fff; } .day.shift-off { background: var(--bg); color: var(--muted); }
.calendarlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .84rem; color: var(--muted); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); margin-right: 4px; vertical-align: baseline; }
.legend-dot.off { background: var(--red); } .legend-dot.green, .legend-dot.personal { background: var(--green); } .legend-dot.orange { background: var(--orange); } .legend-dot.work { background: var(--violet); }
.month-head { align-items: center; } .monthname { flex: 1; text-align: center; font-size: 1.35rem; }
.month-title, .mini-month-title { font-weight: 750; margin: 0 0 6px; font-size: 1rem; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: var(--gap); }
.year-grid-big { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.mini-month { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.mini-stats { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.mini-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; } .mini-days.wide { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); }
.mini-day { text-align: center; padding: 5px 0; border-radius: 8px; background: var(--bg); color: var(--ink); font-size: .85rem; font-weight: 600; }
.mini-day:hover { background: var(--grad); color: #fff; text-decoration: none; }
.year-nav, .pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 18px; }
.pager-mid { color: var(--muted); font-size: .92rem; text-align: center; }
.year-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 18px; }
.year-jump.big { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.year-jump label { font-weight: 650; }
.year-jump input { height: 44px; border-radius: 12px; border: 1.5px solid var(--line); padding: 0 14px; font: inherit; background: var(--card); color: var(--ink); min-width: 0; }
.year-jump.big input { flex: 1; min-width: 180px; max-width: 320px; font-size: 1.1rem; }
.year-status { color: var(--red); font-weight: 600; }
.decades { display: grid; gap: 6px; margin-top: 12px; }
.decade { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .decade b { width: 74px; color: var(--muted); font-size: .85rem; }
.decade a, .decade-line a { padding: 3px 9px; border-radius: 8px; background: var(--bg2); color: var(--ink); font-size: .9rem; } .decade-line a.on { background: var(--grad); color: #fff; }
.decade-line { margin: 16px 0; line-height: 2.1; }

/* ---- виджеты содержимого ---- */
.datecard { display: flex; align-items: center; gap: 14px; } .datecard-num { font-size: 3rem; font-weight: 800; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.counter-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); } .counter-row:last-child { border: 0; }
.counter.big { background: var(--grad); color: #fff; border-radius: var(--radius); padding: 18px 22px; margin: 14px 0; display: flex; flex-direction: column; gap: 4px; } .counter.big a { color: #fff; text-decoration: underline; } .counter.big b { font-size: 1.4rem; }
div.holiday { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); } div.holiday:last-child { border: 0; }
div.holiday small, .hist-row small { display: block; color: var(--muted); }
.flag { font-size: 1.5rem; line-height: 1.2; }
.hist-row { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); } .hist-row:last-child { border: 0; }
.hist-year { flex: none; min-width: 52px; font-weight: 800; color: var(--blue); }
.moon { display: flex; gap: 12px; align-items: center; } .moon-icon { font-size: 2.4rem; } .moon small { display: block; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 0 0 12px; } .facts dt { color: var(--muted); font-size: .84rem; } .facts dd { margin: 0; font-weight: 800; font-size: 1.3rem; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); margin: 12px 0; }
.spec-table { width: 100%; border-collapse: collapse; min-width: 420px; } .spec-table th, .spec-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.spec-table th { background: var(--bg2); font-size: .84rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .spec-table tr:last-child td { border: 0; } .spec-table tr.current td { background: color-mix(in srgb, var(--teal) 12%, var(--card)); font-weight: 650; }
.timeline { list-style: none; margin: 0; padding: 0; } .timeline li { padding: 8px 0 8px 14px; border-left: 3px solid var(--teal); margin-bottom: 8px; } .timeline small { display: block; color: var(--muted); }

/* ---- формы, планировщик, настройки ---- */
[hidden] { display: none !important; }
input, select, textarea { font: inherit; color: var(--ink); }
.calc-form, .pl-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0 18px; box-shadow: var(--shadow); }
.calc-form label, .pl-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.calc-form input, .calc-form textarea, .pl-form input:not([type=radio]), .pl-form select, .pl-form textarea, .calc-mini input { min-height: 42px; border-radius: 12px; border: 1.5px solid var(--line); padding: 8px 12px; background: var(--bg); width: 100%; }
.calc-form textarea { width: 100%; } .calc-form label.check, .check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.calc-mini { display: grid; gap: 10px; } .calc-mini label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; }
.pl-form { display: grid; grid-template-columns: 1fr; box-shadow: none; background: var(--bg); } .pl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .pl-tabs { display: flex; gap: 18px; } .pl-tabs label { flex-direction: row; align-items: center; gap: 6px; }
.pl-toggle { display: flex; gap: 8px; margin-bottom: 12px; } .pl-toggle .pill { cursor: pointer; opacity: .5; } .pl-toggle .pill[aria-pressed=true] { opacity: 1; color: #fff; } .pill-personal[aria-pressed=true] { background: var(--green); } .pill-work[aria-pressed=true] { background: var(--violet); }
.pl-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.pi { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--bg); border-left: 4px solid var(--green); } .pi-work { border-left-color: var(--violet); }
.pi > div { flex: 1; min-width: 0; overflow-wrap: anywhere; } .pi small { display: block; color: var(--muted); } .pi p { margin: .3em 0 0; }
.pi-dot { display: none; } .pi-del { border: 0; background: transparent; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); } .pi-del:hover { color: var(--red); }
.pi-empty { color: var(--muted); padding: 6px 2px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; } .form-msg { min-height: 1.2em; margin-top: 8px; }
.settings-list { display: grid; gap: 10px; } .setting-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; } .setting-row.is-disabled { opacity: .55; cursor: not-allowed; }
.setting-icon { font-size: 1.4rem; } .setting-text { flex: 1; min-width: 0; } .setting-row input { width: 22px; height: 22px; accent-color: var(--blue); }
.widget-settings { list-style: none; padding: 0; columns: 2 280px; }
textarea { resize: vertical; }

.day.shift-mine { box-shadow: inset 0 -4px 0 var(--shift, var(--violet)); }
.sched-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.sched-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg); border-radius: 12px; }
.sched-list li > span { flex: 1; min-width: 0; } .sched-list small { display: block; color: var(--muted); } .sched-list i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.sched-form { display: grid; gap: 10px; } .sched-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.sched-form input { min-height: 42px; border-radius: 12px; border: 1.5px solid var(--line); padding: 6px 12px; background: var(--bg); width: 100%; } .sched-form input[type=color] { padding: 2px 6px; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.wk-day { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 220px; box-shadow: var(--shadow); }
.wk-day.today { outline: 2px solid var(--teal); } .wk-day.weekend .wk-head span { color: var(--red); }
.wk-head { font-size: 1rem; margin: 0 0 10px; } .wk-head a { color: var(--ink); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; } .wk-head b { font-size: 1.5rem; } .wk-head small { color: var(--muted); font-weight: 500; }
.wk-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .wk-items .pi { flex-direction: column; gap: 2px; padding: 6px 8px; } .pi-shift { background: color-mix(in srgb, var(--violet) 12%, var(--bg)); }
@media (max-width: 1100px) { .week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .week { grid-template-columns: 1fr; } .wk-day { min-height: 0; } }

/* ---- адаптив ---- */
@media (min-width: 1700px) { body { font-size: 17px; } .layout { grid-template-columns: minmax(0, 1fr) 460px; } }
@media (max-width: 1100px) { .layout { grid-template-columns: 1fr; } .hero { grid-template-columns: 1fr; } .hero-art { display: none; } }
@media (max-width: 640px) {
  :root { --gap: 12px; }
  .content { padding: 12px; }
  .searchbox input { height: 44px; font-size: 16px; }
  .day { aspect-ratio: 1; border-radius: 10px; font-size: .92rem; } .cgrid-head, .cgrid-body { gap: 3px; }
  .panel, .widget { padding: 14px; border-radius: 16px; } .pl-row { grid-template-columns: 1fr; }
  .hero { border-radius: 20px; padding: 18px; } .hero-actions .btn { flex: 1 1 100%; } .stats { grid-template-columns: 1fr 1fr; } .decade b { width: 100%; }
  .widget-settings { columns: 1; }
}
@media (max-width: 380px) { .stats { grid-template-columns: 1fr; } .logo-text { font-size: 1rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .siteheader, .sitefooter, .shade, .hero-actions, .btn { display: none !important; }
  .mainwrap { margin: 0; } body { background: #fff; color: #000; } .panel, .widget, .mini-month, .stat { box-shadow: none; break-inside: avoid; }
}

/* ---- онлайн-запись ---- */
.pill.on { background: var(--grad); color: #fff; }
.pill-row { margin-bottom: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wide-field { flex: 1 1 100%; } textarea.code { width: 100%; font: .82rem/1.4 ui-monospace, Menlo, Consolas, monospace; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg); color: var(--ink); }
.btn-xs { min-height: 32px; padding: 0 14px; font-size: .85rem; margin-top: 6px; }
.timeline li.cancelled { opacity: .5; text-decoration: line-through; border-left-color: var(--muted); }
body.embed .siteheader, body.embed .sitefooter, body.embed .shade, body.embed .skip-link { display: none !important; }
body.embed { background: var(--card); } body.embed .content { padding: 14px; }
.calc-form input[type=checkbox], .calc-form input[type=radio], .pl-form input[type=radio], .spec-table input[type=checkbox] { width: 20px; min-height: 0; height: 20px; padding: 0; accent-color: var(--blue); }
.spec-table input[type=time] { min-height: 38px; border-radius: 10px; border: 1.5px solid var(--line); padding: 4px 8px; background: var(--bg); }
.calc-form label.check { flex-direction: row; align-items: flex-start; }

/* ---- печатный календарь ---- */
.pc-layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.pc-form { display: grid; gap: 12px; } .pc-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.pc-form input:not([type=range]):not([type=color]):not([type=file]), .pc-form select { min-height: 42px; border-radius: 12px; border: 1.5px solid var(--line); padding: 6px 12px; background: var(--bg); width: 100%; }
.pc-form input[type=color] { width: 100%; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); padding: 2px 6px; background: var(--bg); }
.pc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .pc-photo { border: 1.5px dashed var(--line); border-radius: var(--radius-sm); padding: 12px; display: grid; gap: 8px; }
.pc-preview { position: sticky; top: 84px; text-align: center; } #pcCanvas { max-width: 100%; max-height: 78vh; height: auto; border-radius: 10px; box-shadow: var(--shadow-lg); background: #fff; }
.pc-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; font-weight: 700; }
@media (max-width: 1000px) { .pc-layout { grid-template-columns: 1fr; } .pc-preview { position: static; order: -1; } }

/* ---- общий доступ и импорт ---- */
.share-list, .sched-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.share-list li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.share-list li > span { display: grid; gap: 4px; min-width: 0; flex: 1; } .share-list small { color: var(--muted); }
.share-list input { width: 100%; min-height: 36px; border-radius: 10px; border: 1.5px solid var(--line); padding: 4px 10px; background: var(--bg); font-size: .8rem; }
.import-form, .share-form { display: grid; gap: 10px; } .import-form label, .share-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.share-form .check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.shared-days { list-style: none; margin: 0; padding: 0; display: grid; }
.shared-days li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); }
.shared-days li.weekend .sd-date { color: #d83a3a; } .shared-days li.today { background: rgba(33, 181, 154, .1); border-radius: 10px; }
.sd-date small { font-weight: 500; color: var(--muted); } .sd-ev { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sd-item { background: color-mix(in srgb, var(--c) 16%, transparent); border-left: 4px solid var(--c); padding: 3px 10px; border-radius: 8px; font-size: .9rem; }

/* ===== v9: каркас — служебная полоса, шапка, чипы месяцев, боковое меню карточкой, тёмный подвал ===== */
.utilbar { background: #1c2036; color: #c3cae6; font-size: 13px; }
.util-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 7px var(--gap); }
.utilbar .util-links { display: flex; gap: 6px 20px; flex-wrap: wrap; } .utilbar a { color: #c3cae6; } .utilbar a:hover { color: #fff; text-decoration: none; }
.utilbar .util-hot { color: #ffab4d; font-weight: 800; white-space: nowrap; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 10px var(--gap); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px rgba(30, 50, 130, .35); }
.topbar .searchbox { flex: 1; max-width: 760px; margin: 0 auto; }
.top-actions { display: flex; gap: 10px; flex: none; }
.mobilemenu { display: none; border: 1px solid var(--line); background: var(--card); width: 42px; height: 42px; border-radius: 12px; font-size: 1.2rem; cursor: pointer; color: var(--ink); flex: none; }
.chips-row { display: flex; gap: 6px; padding: 8px var(--gap); overflow-x: auto; scrollbar-width: none; background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chips-row::-webkit-scrollbar { display: none; }
.chip { --h: 200; flex: none; display: inline-flex; align-items: center; padding: 4px 13px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink); white-space: nowrap; background: color-mix(in srgb, hsl(var(--h) 80% 50%) 20%, var(--card)); border: 1px solid color-mix(in srgb, hsl(var(--h) 80% 50%) 40%, transparent); transition: transform .15s; }
.chip:hover { transform: translateY(-1px); text-decoration: none; }
.chip.c1 { --h: 172; } .chip.c2 { --h: 182; } .chip.c3 { --h: 194; } .chip.c4 { --h: 206; } .chip.c5 { --h: 220; } .chip.c6 { --h: 236; }
.chip.c7 { --h: 254; } .chip.c8 { --h: 272; } .chip.c9 { --h: 292; } .chip.c10 { --h: 312; } .chip.c11 { --h: 330; } .chip.c12 { --h: 348; }
.chip-today { background: var(--grad-alt); color: #fff; border-color: transparent; box-shadow: 0 8px 16px -8px rgba(255, 90, 31, .7); }
.chip-year { background: var(--grad); color: #fff; border-color: transparent; }
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: var(--gap); padding: var(--gap); align-items: start; }
.mainwrap { min-width: 0; } .content { padding: 0; width: 100%; }
.sidebar { position: sticky; top: 76px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 10px; max-height: calc(100vh - 90px); overflow-y: auto; scrollbar-width: thin; }
.drawer-head { display: none; }
.navheading { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 12px 10px 4px; font-weight: 800; }
.navheading:first-of-type { margin-top: 4px; }
.navlink { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; color: var(--ink); font-weight: 500; transition: background .15s, transform .15s; }
.navlink:hover { background: color-mix(in srgb, var(--blue) 9%, transparent); transform: translateX(2px); text-decoration: none; }
.navlink.active { background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 20%, transparent), transparent 95%); box-shadow: inset 3px 0 0 var(--blue); font-weight: 650; }
.nl { min-width: 0; line-height: 1.25; }
.ni { --h: 200; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex: none; background: linear-gradient(135deg, hsl(var(--h) 76% 44%), hsl(calc(var(--h) + 40) 70% 54%)); box-shadow: 0 8px 14px -8px hsl(var(--h) 75% 40%); }
.ni span { filter: brightness(0) invert(1); font-size: 15px; line-height: 1; }
.ni.i0 { --h: 172; } .ni.i1 { --h: 190; } .ni.i2 { --h: 208; } .ni.i3 { --h: 228; } .ni.i4 { --h: 252; } .ni.i5 { --h: 276; } .ni.i6 { --h: 304; } .ni.i7 { --h: 336; }
.side-status { margin: 10px 4px 2px; font-size: .8rem; color: var(--muted); background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.shade { position: fixed; inset: 0; background: rgba(12, 18, 50, .5); z-index: 45; backdrop-filter: blur(2px); }
.sitefooter { background: #12162b; color: #aab3d6; padding: 36px var(--gap) 22px; margin-top: 20px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(130px, 1fr)); gap: 24px; }
.foot-brand p { margin: 12px 0 0; max-width: 34ch; font-size: .92rem; } .sitefooter .brand { color: #fff; }
.foot-col h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin: 0 0 10px; }
.foot-col a { display: block; color: #aab3d6; padding: 3px 0; font-size: .92rem; } .foot-col a:hover { color: #fff; }
.foot-meta { margin-top: 26px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; }

/* ===== v9: кнопки, заголовки, карточки ===== */
.btn { border-radius: 14px; } 
.btn-gradient-alt { background: var(--grad-alt); box-shadow: 0 10px 22px -8px rgba(255, 90, 31, .65); }
.btn-green { background: var(--grad-green); color: #fff; box-shadow: 0 10px 22px -8px rgba(31, 168, 60, .6); }
.btn-soft { background: color-mix(in srgb, var(--blue) 12%, var(--card)); color: var(--blue); }
h1 { font-weight: 800; letter-spacing: -.02em; }
.section > h1, .section > .kicker + h1 { position: relative; }
.kicker, .eyebrow { color: var(--violet); }
h2.sec { display: flex; align-items: center; gap: 12px; font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem); margin: 8px 0 14px; }
h2.sec::before { content: ""; width: 6px; height: 1.2em; border-radius: 4px; background: var(--grad); flex: none; }
.panel, .widget { border-radius: 20px; border-color: var(--line); }
.emoji-box { background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 24%, var(--card)), color-mix(in srgb, var(--violet) 16%, var(--card))); }
.day { background: color-mix(in srgb, var(--bg2) 55%, var(--card)); border: 1px solid transparent; }
a.day:hover { background: color-mix(in srgb, var(--blue) 14%, var(--card)); border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
.day.today { outline: 0; border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); font-weight: 800; }
.day.selected { background: var(--grad); border-color: transparent; }
.dot { background: var(--orange); }
.hist-year, .datecard-num { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mini-month, .info-card, .stat { border-radius: 18px; }
.linkcard:hover { transform: translateY(-3px); }

/* ===== v9: герой, плитки ===== */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: var(--gap); align-items: center; border: 0; border-radius: 28px; padding: clamp(22px, 3.2vw, 46px); color: #fff; margin-bottom: var(--gap);
  background: radial-gradient(520px 260px at 92% 0%, rgba(255, 255, 255, .26), transparent 62%), radial-gradient(420px 320px at 0% 110%, rgba(255, 120, 200, .38), transparent 65%), radial-gradient(260px 260px at 60% 120%, rgba(255, 170, 60, .45), transparent 70%), var(--hero);
  box-shadow: 0 30px 60px -30px rgba(90, 70, 220, .75); }
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { color: #d7e6ff; }
.hero h1 { font-size: clamp(1.9rem, 2.6vw + 1rem, 3.1rem); font-weight: 850; line-height: 1.1; color: #fff; text-shadow: 0 2px 20px rgba(20, 20, 80, .25); }
.hero .gradient-text { background: linear-gradient(90deg, #aef3ff, #ffd9a0); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.hero p { color: #eef4ff; font-size: 1.05rem; max-width: 58ch; }
.hero .btn-gradient-alt { box-shadow: 0 12px 26px -8px rgba(255, 90, 31, .8); }
.hero .btn-gradient { background: #fff; color: #2d3fa8; box-shadow: 0 12px 28px -10px rgba(10, 10, 80, .55); }
.hero .btn-white { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .55); backdrop-filter: blur(6px); box-shadow: none; }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 22px; }
.hero-stats > div { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(8px); border-radius: 16px; padding: 10px 14px; }
.hero-stats b { display: block; font-size: 1.35rem; line-height: 1.15; font-weight: 800; } .hero-stats span { font-size: .84rem; color: #e6eeff; }
.hero-art { background: var(--card); color: var(--ink); border-radius: 24px; padding: 16px; box-shadow: 0 28px 50px -20px rgba(10, 10, 80, .65); transform: rotate(1.5deg); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .1); z-index: 0; }
.hero::before { width: 260px; height: 260px; right: 34%; top: -90px; } .hero::after { width: 180px; height: 180px; left: 38%; bottom: -80px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; margin-bottom: calc(var(--gap) + 6px); }
.tile { --h: 200; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 10px 16px; border-radius: 18px; color: #fff; text-align: center; background: linear-gradient(145deg, hsl(var(--h) 76% 46%), hsl(calc(var(--h) + 42) 70% 52%)); box-shadow: 0 14px 26px -14px hsl(var(--h) 75% 40% / .85); transition: transform .2s, box-shadow .2s; }
.tile::after { content: ""; position: absolute; right: -26px; top: -26px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.tile::before { content: ""; position: absolute; left: -20px; bottom: -34px; width: 80px; height: 80px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.tile:hover { transform: translateY(-6px) scale(1.03); text-decoration: none; box-shadow: 0 24px 36px -14px hsl(var(--h) 75% 40% / .9); }
.tile b { font-size: 2.1rem; font-weight: 850; line-height: 1.05; text-shadow: 0 3px 12px rgba(0, 0, 0, .2); } .tile span { font-weight: 700; opacity: .95; } .tile small { color: rgba(255, 255, 255, .85); font-size: .8rem; }
.tiles.months .tile b { font-size: 1.35rem; padding-top: 6px; } .tiles.months .tile:nth-child(1) { --h: 172; } .tiles.months .tile:nth-child(2) { --h: 182; } .tiles.months .tile:nth-child(3) { --h: 194; }
.tiles.months .tile:nth-child(4) { --h: 206; } .tiles.months .tile:nth-child(5) { --h: 220; } .tiles.months .tile:nth-child(6) { --h: 236; } .tiles.months .tile:nth-child(7) { --h: 254; }
.tiles.months .tile:nth-child(8) { --h: 272; } .tiles.months .tile:nth-child(9) { --h: 292; } .tiles.months .tile:nth-child(10) { --h: 312; } .tiles.months .tile:nth-child(11) { --h: 330; } .tiles.months .tile:nth-child(12) { --h: 348; }
.tiles.years .tile:nth-child(1) { --h: 172; } .tiles.years .tile:nth-child(2) { --h: 200; } .tiles.years .tile:nth-child(3) { --h: 230; } .tiles.years .tile:nth-child(4) { --h: 262; } .tiles.years .tile:nth-child(5) { --h: 295; } .tiles.years .tile:nth-child(6) { --h: 325; } .tiles.years .tile:nth-child(7) { --h: 348; }
.tile.now { outline: 3px solid #ffab4d; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .tile { animation: rise .5s both; } @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } } }

/* ===== v9: адаптив ===== */
@media (min-width: 1700px) { :root { --side: 286px; } }
@media (max-width: 1100px) { .hero { grid-template-columns: 1fr; } .hero-art { display: none; } .foot-grid { grid-template-columns: repeat(3, 1fr); } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: min(86vw, 310px); max-height: none; border-radius: 0 22px 22px 0; transform: translateX(-105%); transition: transform .25s; box-shadow: var(--shadow-lg); padding: 14px 12px; }
  .sidebar.open { transform: none; }
  .drawer-head { display: block; padding: 4px 8px 10px; }
  .mobilemenu { display: inline-grid; place-items: center; }
  .top-actions .btn-soft, .top-actions .btn-gradient-alt { display: none; } .util-in .util-links a:nth-child(n+3) { display: none; }
}
@media (max-width: 640px) {
  :root { --gap: 12px; }
  .topbar { flex-wrap: wrap; } .topbar .brand { margin-right: auto; } .topbar .searchbox { order: 5; flex: 1 1 100%; max-width: none; }
  .top-actions { display: none; } .util-in .util-links { display: none; } .util-in { justify-content: center; }
  .hero { border-radius: 20px; padding: 18px; } .hero-stats { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 10px; } .tile { padding: 14px 6px 12px; } .tile b { font-size: 1.6rem; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== v9: уточнения ===== */
.ni { background: linear-gradient(135deg, color-mix(in srgb, hsl(var(--h) 80% 50%) 26%, var(--card)), color-mix(in srgb, hsl(calc(var(--h) + 40) 80% 55%) 12%, var(--card))); box-shadow: inset 0 0 0 1px color-mix(in srgb, hsl(var(--h) 80% 50%) 25%, transparent); }
.ni span { filter: none; }
.hero h1 { font-size: clamp(1.7rem, 1.6vw + 1.1rem, 2.6rem); }
.hero p { font-size: 1rem; }
.hero .btn { min-height: 42px; padding: 0 16px; font-size: .95rem; }
.hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.hero-stats > div { padding: 8px 12px; border-radius: 14px; } .hero-stats b { font-size: 1.02rem; } .hero-stats span { font-size: .78rem; line-height: 1.25; display: block; }
@media (max-width: 760px) { .hero-stats { grid-template-columns: 1fr 1fr; } }
.pc-layout > *, .pc-form > *, .pc-grid2 > * { min-width: 0; } .pc-form input, .pc-form select { max-width: 100%; }
@media (max-width: 640px) { .pc-grid2 { grid-template-columns: 1fr; } .pc-form input[type=file] { width: 100%; font-size: .85rem; } }
.sd-del { display: inline; margin: 0 0 0 6px; } .sd-del button { border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--muted); } .sd-del button:hover { color: var(--red); }
.transfer { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); } .transfer h4 { margin: 0 0 6px; }
.tr-code { font: 800 1.3rem/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--blue); }
.tr-form { display: grid; gap: 8px; } .tr-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; } .tr-form input { min-height: 40px; border-radius: 12px; border: 1.5px solid var(--line); padding: 6px 12px; background: var(--bg); text-transform: uppercase; }

/* ---- v11: конструктор встраивания ---- */
.eb [hidden] { display: none !important; }
.eb-panel { padding: clamp(14px, 2vw, 26px); }
.eb-h { margin: 1.3em 0 .55em; font-size: 1.02rem; } .eb-h:first-child { margin-top: 0; }
.eb-cards { display: grid; gap: 10px; }
.eb-cards-5 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } .eb-cards-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.eb-card { position: relative; cursor: pointer; display: block; }
.eb-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.eb-card > span { display: grid; gap: 2px; height: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.eb-card i { font-style: normal; font-size: 1.4rem; line-height: 1; margin-bottom: 4px; }
.eb-card b { font-size: .98rem; } .eb-card small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.eb-card:hover > span { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.eb-card input:checked + span { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); background: color-mix(in srgb, var(--blue) 6%, var(--card)); }
.eb-card input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; }
.eb-row { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.eb-fs { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .eb-fs legend { font-size: .85rem; color: var(--muted); padding: 0; margin-bottom: 6px; float: left; width: 100%; }
.eb-seg { position: relative; } .eb-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.eb-seg span { display: block; padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 600; font-size: .9rem; }
.eb-seg input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.eb-seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; }
.eb-sw { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.eb-dot { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; }
.eb-dot.on { box-shadow: 0 0 0 2.5px var(--ink); }
.eb-sw input[type=color] { width: 34px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer; }
.eb-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 18px; align-items: end; }
.eb-opts label { display: grid; gap: 4px; font-size: .88rem; color: var(--muted); }
.eb-opts label.eb-check { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: .92rem; min-height: 38px; }
.eb-opts input:not([type=checkbox]), .eb-opts select { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; min-width: 0; width: 100%; }
.eb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.eb-tabs button { padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.eb-tabs button.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
.eb-code { margin: 0; padding: 16px; border-radius: 14px; background: #1b1830; color: #e9e6ff; font: 500 .8rem/1.55 ui-monospace, "SFMono-Regular", Consolas, monospace; white-space: pre-wrap; word-break: break-all; overflow: auto; max-height: 220px; }
.eb-actions { display: flex; gap: 14px; align-items: center; margin-top: 12px; flex-wrap: wrap; } .eb-hint { color: var(--green); font-weight: 700; }
.eb-note { margin: 10px 0 4px; color: var(--muted); font-size: .88rem; } .eb-direct { font-size: .88rem; margin: 0; word-break: break-all; }
.eb-preview { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.eb-pv-bar { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--bg2); }
.eb-pv-body { padding: 18px; background: repeating-linear-gradient(45deg, transparent 0 12px, color-mix(in srgb, var(--line) 35%, transparent) 12px 13px); display: flex; justify-content: center; }
.eb-pv-body iframe { border: 0; width: 100%; height: 420px; background: transparent; border-radius: 12px; box-shadow: 0 6px 24px rgba(20, 40, 90, .14); color-scheme: normal; }
.eb-faq { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.eb-promo { display: flex; align-items: center; gap: 18px; justify-content: space-between; flex-wrap: wrap; padding: 18px 22px; margin-top: var(--gap); border: 2px solid color-mix(in srgb, var(--violet) 55%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--violet) 7%, var(--card)); }
.eb-promo h2 { margin: 0 0 4px; font-size: 1.25rem; } .eb-promo p { margin: 0; color: var(--muted); }
.eb-modal { width: min(960px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 22px; background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); }
.eb-modal::backdrop { background: rgba(10, 16, 40, .55); }
.eb-modal-in { padding: clamp(16px, 3vw, 30px); position: relative; }
.eb-modal-x { position: sticky; top: 0; float: right; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--ink); z-index: 2; }
@media (max-width: 640px) { .eb-promo .btn { width: 100%; } .eb-pv-body { padding: 10px; } }

/* ---- v13: совместная работа ---- */
.live-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; margin: 0 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); animation: livepulse 2s infinite; display: inline-block; }
.live-bar.off .live-dot { background: var(--yellow); animation: none; }
@keyframes livepulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-who, .share-live p { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.who { font-style: normal; font-size: .82rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 14%, var(--card)); color: var(--ink); }
.who.owner { background: color-mix(in srgb, var(--orange) 22%, var(--card)); } .who.me { outline: 2px solid color-mix(in srgb, var(--blue) 45%, transparent); }
.live-name { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); }
.live-name input { padding: 5px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; width: 11rem; max-width: 100%; }
.sd-item .by { color: var(--muted); font-size: .72rem; margin-left: 4px; }
.live-activity { margin-top: 14px; } .live-activity .timeline small, .share-live .timeline small { display: block; color: var(--muted); }
.share-live { margin: 8px 0; }
.live-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: var(--card); padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: .92rem; z-index: 80; max-width: calc(100vw - 32px); transition: opacity .4s; }
.live-toast.hide { opacity: 0; }

/* v14: цвета месяцев по погоде в России (зима холодная, лето тёплое) */
.tiles.months .tile:nth-child(1), .chip.c1 { --a: #1e3a8a; --b: #3b82f6; }
.tiles.months .tile:nth-child(2), .chip.c2 { --a: #1e40af; --b: #38a3e8; }
.tiles.months .tile:nth-child(3), .chip.c3 { --a: #3d80b5; --b: #8cc4de; }
.tiles.months .tile:nth-child(4), .chip.c4 { --a: #2a9d8f; --b: #86c97a; }
.tiles.months .tile:nth-child(5), .chip.c5 { --a: #2f9e4a; --b: #9bd44f; }
.tiles.months .tile:nth-child(6), .chip.c6 { --a: #5fa82a; --b: #e2b92b; }
.tiles.months .tile:nth-child(7), .chip.c7 { --a: #e8851a; --b: #e23d2b; }
.tiles.months .tile:nth-child(8), .chip.c8 { --a: #e0701a; --b: #d9a328; }
.tiles.months .tile:nth-child(9), .chip.c9 { --a: #d98a1e; --b: #b5601d; }
.tiles.months .tile:nth-child(10), .chip.c10 { --a: #b0521f; --b: #7d4a33; }
.tiles.months .tile:nth-child(11), .chip.c11 { --a: #64738a; --b: #44566f; }
.tiles.months .tile:nth-child(12), .chip.c12 { --a: #2f4aa3; --b: #5b84dc; }
.tiles.months .tile { background: linear-gradient(145deg, var(--a), var(--b)); box-shadow: 0 14px 26px -14px color-mix(in srgb, var(--a) 85%, #000); }
.tiles.months .tile:hover { box-shadow: 0 24px 36px -14px color-mix(in srgb, var(--a) 90%, #000); }
.tiles.months .tile b, .tiles.months .tile small { text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.chip[class*="c"]:not(.chip-today):not(.chip-year) { background: color-mix(in srgb, var(--a, #888) 30%, var(--card)); border-color: color-mix(in srgb, var(--a, #888) 45%, transparent); }

/* v15: главная — вверху то, что нужно чаще всего */
.priority-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); align-items: start; }
.priority-band > .widget { margin: 0; box-shadow: var(--shadow-lg); border-top: 4px solid var(--accent, #ff7a2f); }
.priority-band > .widget.blue { --accent: #4a6cf0; } .priority-band > .widget.green { --accent: #21b59a; } .priority-band > .widget.orange { --accent: #ff7a2f; }
.priority-band .widget-head h3 { font-size: 1.15rem; }
.ha-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ha-timeline li { padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--accent, #21b59a) 8%, var(--card)); }
.ha-timeline li.is-bday { background: color-mix(in srgb, #ff7a2f 14%, var(--card)); }
.ha-timeline a { color: inherit; display: block; text-decoration: none; }
.ha-when { color: var(--muted); font-size: .88rem; }
.ha-add { margin-top: 12px; } .ha-add summary { cursor: pointer; font-weight: 700; color: #2d6cdf; }
.ha-form { display: grid; gap: 8px; margin-top: 10px; }
.ha-form input[type=text], .ha-form input[type=number], .ha-form select { width: 100%; min-width: 0; }
.ha-row { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 8px; }
.ha-check { font-size: .88rem; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
@media (max-width: 1100px) { .priority-band { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .priority-band { grid-template-columns: 1fr; } .ha-row { grid-template-columns: 70px 1fr; } .ha-row input { grid-column: 1 / -1; } }
.layout.layout-single { grid-template-columns: minmax(0, 1fr); }

/* ===== v16: единая система виджетов (отступы, заголовки, высоты, формы) ===== */
.widget { display: flex; flex-direction: column; padding: 20px; margin-bottom: var(--gap); border-radius: 20px; }
.widget-head { gap: 12px; margin-bottom: 14px; min-height: 40px; }
.widget-head h3 { font-size: 1.05rem; line-height: 1.25; font-weight: 750; }
.emoji-box { width: 40px; height: 40px; border-radius: 12px; font-size: 1.2rem; }
.widget > :has(+ .widget-more) { margin-bottom: 14px; }
.widget-more { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; font-weight: 650; line-height: 1.4; }
.widget > p.muted.small, .widget > p.hint { margin: 0; }
.widget .hint { font-size: .84rem; color: var(--muted); }
.widget h4 { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.widget h4:not(:first-of-type) { margin-top: 12px; }
div.holiday, .hist-row, .counter-row { padding: 10px 0; }
div.holiday:first-of-type, .hist-row:first-of-type { padding-top: 2px; }
div.holiday b, .hist-row b { font-size: .98rem; line-height: 1.3; }
.hist-year { min-width: 48px; font-size: .95rem; }
/* Главная: верхний блок — три равные карточки */
.priority-band { align-items: stretch; margin-bottom: var(--gap); }
.priority-band > .widget { margin: 0; border-top: 1px solid var(--line); box-shadow: var(--shadow); }
.priority-band .widget-head h3 { font-size: 1.1rem; }
.priority-band > .widget::before { content: ""; display: block; height: 4px; margin: -20px -20px 16px; border-radius: 20px 20px 0 0; background: var(--accent, #ff7a2f); }
/* Колонки и сетка нижних виджетов */
.layout { align-items: start; }
.layout .widget:last-child { margin-bottom: 0; }
.widgets-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); align-items: stretch; margin-top: var(--gap); }
.widgets-grid .widget { margin: 0; }
/* Карточка «Сегодня» */
.datecard { gap: 16px; margin-bottom: 14px; align-items: center; }
.datecard-num { font-size: 3.2rem; min-width: 1.2ch; text-align: center; }
.datecard > div:last-child { line-height: 1.35; }
.facts { grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.facts > div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-size: .8rem; } .facts dd { font-size: 1.15rem; line-height: 1.2; }
/* Формы внутри виджетов: одинаковые поля и кнопки */
.calc-mini, .year-jump, .ha-form { display: grid; gap: 10px; margin: 0; align-items: stretch; }
.calc-mini label, .year-jump label, .ha-form label { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; font-weight: 650; color: var(--muted); }
.widget input[type=text], .widget input[type=number], .widget input[type=date], .widget select { height: 44px; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); padding: 0 12px; background: var(--bg); width: 100%; min-width: 0; font-size: .95rem; color: var(--ink); }
.widget form .btn { width: 100%; }
.year-jump input { flex: none; }
.widget .pill-row { margin-top: 12px; }
.widget .pill { padding: 5px 13px; font-size: .86rem; }
/* Таймер до Нового года */
.ny-card { border-radius: 18px; padding: 18px; color: #fff; background: linear-gradient(135deg, #1e3a8a, #3b82f6 60%, #7dd3fc); box-shadow: 0 16px 30px -18px rgba(30, 58, 138, .8); text-align: center; }
.ny-title { font-weight: 700; margin-bottom: 12px; }
.ny-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ny-tiles > div { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); border-radius: 14px; padding: 12px 4px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ny-tiles b { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 850; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ny-tiles span { font-size: .78rem; opacity: .9; }
.ny-note { margin-top: 12px; font-size: .84rem; opacity: .85; }
.ny-card { margin-bottom: 18px; }
.ny-mini { padding: 14px; margin-bottom: 14px; } .ny-mini .ny-title { font-size: .92rem; margin-bottom: 10px; }
.ny-mini .ny-tiles { gap: 6px; } .ny-mini .ny-tiles > div { padding: 8px 2px 7px; border-radius: 10px; } .ny-mini .ny-tiles b { font-size: 1.35rem; } .ny-mini .ny-tiles span { font-size: .68rem; }
/* Калькуляторы: день недели ДР */
.table { width: 100%; border-collapse: collapse; } .table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table th { background: var(--bg2); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .table tr:last-child td { border: 0; }
.table tr.is-weekend td { background: color-mix(in srgb, var(--orange) 10%, var(--card)); }
.wd-bars { display: grid; gap: 8px; max-width: 520px; margin: 12px 0 24px; }
.wd-bar { display: grid; grid-template-columns: 34px 1fr 28px; gap: 10px; align-items: center; font-weight: 650; }
.wd-bar i { height: 14px; border-radius: 99px; background: var(--bg2); position: relative; overflow: hidden; } .wd-bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--grad); border-radius: inherit; }
.wd-bar.weekend i::after { background: var(--grad-alt); } .wd-bar b { text-align: right; }
@media (max-width: 700px) { .widget { padding: 16px; } .priority-band > .widget::before { margin: -16px -16px 14px; } .ny-tiles b { font-size: 1.6rem; } }

.priority-band > .widget { overflow: hidden; }
.widgets-grid { margin-top: var(--gap); }
.layout .widget:last-child { margin-bottom: 0; }
.widget > :has(+ .widget-more) { margin-bottom: 14px !important; border-bottom: 0 !important; }
.widgets-grid .widget-head { min-height: 48px; } .widgets-grid .widget-head h3 { font-size: 1rem; }
.settings-hint { margin-top: 16px; }
.date-warn { background: #fff3cd; color: #5c4400; padding: 10px 16px; text-align: center; font-size: .9rem; font-weight: 600; border-bottom: 1px solid #f0d27a; }

/* ===== v17: компактные виджеты ===== */
:root { --gap: 14px; }
.widget { padding: 14px 16px; border-radius: 16px; margin-bottom: var(--gap); }
.widget-head { gap: 10px; margin-bottom: 8px; min-height: 32px; }
.widget-head h3 { font-size: .98rem; }
.emoji-box { width: 32px; height: 32px; border-radius: 10px; font-size: 1rem; }
.widget > :has(+ .widget-more) { margin-bottom: 8px !important; }
.widget-more { padding-top: 8px; font-size: .86rem; }
.widget { font-size: .93rem; line-height: 1.4; }
.widget .hint, .widget .muted.small { font-size: .82rem; }
.widget h4 { margin-bottom: 2px; font-size: .72rem; } .widget h4:not(:first-of-type) { margin-top: 8px; }
div.holiday, .hist-row, .counter-row { padding: 6px 0; gap: 10px; }
div.holiday:first-of-type, .hist-row:first-of-type { padding-top: 0; }
div.holiday b, .hist-row b { font-size: .93rem; line-height: 1.25; }
div.holiday small, .hist-row small { font-size: .8rem; line-height: 1.3; }
.flag { font-size: 1.2rem; line-height: 1.25; }
.hist-year { min-width: 42px; font-size: .88rem; }
.moon-icon { font-size: 1.9rem; }
/* верхний блок главной */
.priority-band { gap: var(--gap); }
.priority-band > .widget::before { height: 3px; margin: -14px -16px 10px; }
.priority-band .widget-head h3 { font-size: 1rem; }
/* карточка «Сегодня» */
.datecard { gap: 12px; margin-bottom: 8px; }
.datecard-num { font-size: 2.4rem; }
.facts { gap: 8px 12px; padding-top: 8px; }
.facts dt { font-size: .74rem; } .facts dd { font-size: 1rem; }
/* формы */
.calc-mini, .year-jump, .ha-form { gap: 8px; }
.calc-mini label, .year-jump label, .ha-form label { font-size: .78rem; gap: 3px; }
.widget input[type=text], .widget input[type=number], .widget input[type=date], .widget select { height: 38px; min-height: 38px; border-radius: 10px; font-size: .9rem; padding: 0 10px; }
.widget .btn { min-height: 38px; font-size: .9rem; padding: 0 16px; }
.widget .pill-row { margin-top: 8px; gap: 6px; } .widget .pill { padding: 3px 11px; font-size: .8rem; }
.ha-timeline { gap: 5px; } .ha-timeline li { padding: 6px 9px; border-radius: 10px; font-size: .9rem; line-height: 1.3; }
.ha-add { margin-top: 8px; }
/* таймер */
.ny-mini { padding: 10px; margin-bottom: 8px; border-radius: 14px; } .ny-mini .ny-title { font-size: .84rem; margin-bottom: 6px; }
.ny-mini .ny-tiles { gap: 5px; } .ny-mini .ny-tiles > div { padding: 6px 2px 5px; } .ny-mini .ny-tiles b { font-size: 1.15rem; } .ny-mini .ny-tiles span { font-size: .62rem; }
/* нижняя сетка и колонки */
.widgets-grid { gap: var(--gap); margin-top: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.widgets-grid .widget-head { min-height: 32px; } .widgets-grid .widget-head h3 { font-size: .95rem; }
/* календарь месяца и записи (страницы даты/месяца) */
.cal-widget, .planner { padding: 14px 16px; }
.hero { padding: clamp(18px, 2.4vw, 32px); } .hero-stats { margin-top: 14px; } .hero-actions { margin-top: 12px; }
.sec { margin: 18px 0 10px; }
@media (max-width: 700px) { .widget { padding: 12px 14px; } .priority-band > .widget::before { margin: -12px -14px 8px; } }
.tile { padding: 10px 8px 9px; border-radius: 14px; gap: 0; }
.tile b { font-size: 1.7rem; }
.tiles.months .tile b { font-size: 1.1rem; padding-top: 2px; }
.tile small { font-size: .74rem; } .tile span { font-size: .85rem; }
.tile::after { width: 64px; height: 64px; right: -20px; top: -20px; } .tile::before { width: 56px; height: 56px; left: -16px; bottom: -26px; }
.tiles { gap: 10px; }
.tile:hover { transform: translateY(-3px); }
.year-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0 6px; color: var(--muted); font-size: .85rem; }
.year-strip .pill { padding: 2px 10px; font-size: .8rem; font-weight: 600; }
.year-strip .pill.now { background: var(--grad); color: #fff; }
/* v18: астрономический календарь */
.year-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 16px; }
.year-nav .year-jump { margin: 0 0 0 auto; display: flex; flex-direction: row; gap: 8px; align-items: center; }
.year-nav .year-jump input { width: 110px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); padding: 0 10px; background: var(--card); }
.year-nav .year-jump .btn { min-height: 38px; }
.pill.now { background: var(--grad); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.astro-list { display: grid; gap: 6px; }
.astro-row { display: grid; grid-template-columns: 52px 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px 8px 8px; }
.astro-row.past { opacity: .72; } .astro-row.today { outline: 2px solid #ffab4d; }
.astro-row.k-eclipse { border-left: 4px solid #ff7a2f; } .astro-row.k-season { border-left: 4px solid #21b59a; } .astro-row.k-meteor { border-left: 4px solid #7a63e8; } .astro-row.k-moon { border-left: 4px solid #8ea4c8; }
.astro-row.k-moon { padding-top: 5px; padding-bottom: 5px; }
.astro-date { display: flex; flex-direction: column; align-items: center; line-height: 1.1; border-radius: 10px; padding: 4px 0; background: var(--bg2); text-decoration: none; color: var(--ink); }
.astro-date b { font-size: 1.15rem; } .astro-date span { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.astro-ico { font-size: 1.4rem; text-align: center; }
.astro-body b { display: block; font-size: .96rem; } .astro-body small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.astro-time { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--blue); }
@media (max-width: 560px) { .astro-row { grid-template-columns: 44px 26px minmax(0, 1fr); } .astro-time { grid-column: 3; } .year-nav .year-jump { margin-left: 0; width: 100%; } }
/* v18: полоса «Календари» на главной */
.cal-strip { padding: 12px; }
.cal-strip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.cal-tile { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; text-decoration: none !important; color: var(--ink); background: color-mix(in srgb, var(--c) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line)); border-left: 4px solid var(--c); transition: transform .15s, box-shadow .15s; min-width: 0; }
.cal-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px var(--c); }
.cal-ico { font-size: 1.5rem; line-height: 1; flex: none; width: 30px; text-align: center; }
.cal-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cal-txt b { font-size: .95rem; } .cal-txt small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ===== v19: полоса дат, меню без прокрутки, месяцы в строку, страница годов ===== */
.chips-row.day-strip { justify-content: center; align-items: center; gap: 8px; overflow: visible; }
.ds-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.ds-list::-webkit-scrollbar { display: none; }
.ds-pill { flex: none; padding: 5px 16px; border-radius: 10px; font-weight: 700; font-size: .9rem; color: #fff; background: var(--grad); box-shadow: 0 6px 14px -8px rgba(27, 134, 214, .8); text-decoration: none !important; white-space: nowrap; transition: transform .15s; }
.ds-pill:hover { transform: translateY(-1px); filter: brightness(1.07); }
.ds-pill.ds-today { background: var(--card); color: #e0603a; box-shadow: inset 0 0 0 2px #ff7a2f; }
.ds-pill.ds-sel { background: var(--grad-alt); }
.ds-arrow { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 1.3rem; line-height: 1; color: var(--ink); text-decoration: none !important; }
.ds-arrow:hover { background: var(--bg2); } .ds-arrow.off { opacity: .3; }
@media (max-width: 700px) { .chips-row.day-strip { justify-content: flex-start; padding: 6px 8px; } .ds-pill { padding: 5px 12px; } }
/* левое меню: без внутренней прокрутки, компактные строки */
@media (min-width: 1101px) { .sidebar { position: static; max-height: none; overflow: visible; } }
.sidenav .navlink { padding-top: 5px; padding-bottom: 5px; }
.navheading { margin: 10px 10px 2px; }
/* месяцы — в один ряд на широком экране */
@media (min-width: 1280px) {
  .tiles.months { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
  .tiles.months .tile { padding: 9px 4px 8px; border-radius: 12px; }
  .tiles.months .tile b { font-size: clamp(.78rem, .62vw + .3rem, 1.05rem); }
  .tiles.months .tile small { font-size: .68rem; }
}
/* страница «Календарь по годам» */
.yp-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: var(--gap); align-items: center; background: linear-gradient(135deg, #1e3a8a, #3b82f6 60%, #7dd3fc); color: #fff; border-radius: 20px; padding: 20px 24px; box-shadow: 0 18px 34px -20px rgba(30, 58, 138, .8); margin: 12px 0 8px; }
.yp-text p { margin: 0; font-size: .98rem; color: #eaf2ff; max-width: 62ch; }
.yp-form label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 6px; color: #dbe8ff; }
.yp-row { display: flex; gap: 8px; } .yp-row input { flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 0; padding: 0 14px; font-size: 1.2rem; font-weight: 800; background: #fff; color: #1e2a55; }
.yp-row .btn { min-height: 46px; background: linear-gradient(135deg, #ff9a3c, #ff5a1f); color: #fff; box-shadow: 0 10px 20px -10px rgba(255, 90, 31, .9); }
.year-status { display: block; margin-top: 6px; color: #ffd9a0; font-weight: 600; }
.yp-h { margin: 22px 0 10px; font-size: 1.15rem; }
.yp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.yp-card { display: flex; flex-direction: column; gap: 1px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.yp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.yp-card b { font-size: 1.6rem; font-weight: 850; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.yp-card span { font-weight: 650; font-size: .85rem; } .yp-card small { color: var(--muted); font-size: .76rem; }
.yp-card.now { background: var(--grad); border-color: transparent; } .yp-card.now b, .yp-card.now span, .yp-card.now small { color: #fff; background: none; -webkit-text-fill-color: #fff; }
.yp-decades { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.yp-dec { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.yp-dec.cur { border-color: #ff7a2f; box-shadow: 0 0 0 2px color-mix(in srgb, #ff7a2f 35%, transparent); }
.yp-dec h3 { margin: 0 0 6px; font-size: .9rem; color: var(--muted); letter-spacing: .03em; }
.yp-ys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.yp-ys a { text-align: center; padding: 4px 0; border-radius: 8px; background: var(--bg2); color: var(--ink); font-size: .85rem; font-weight: 650; text-decoration: none !important; position: relative; }
.yp-ys a:hover { background: var(--grad); color: #fff; } .yp-ys a.on { background: var(--grad-alt); color: #fff; }
.yp-ys a.leap::after { content: ""; position: absolute; right: 4px; top: 3px; width: 4px; height: 4px; border-radius: 50%; background: #ff7a2f; }
@media (max-width: 800px) { .yp-hero { grid-template-columns: 1fr; padding: 16px; } .yp-cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }
.sidenav .navlink { padding: 3px 8px; gap: 9px; font-size: .95rem; }
.sidenav .ni { width: 26px; height: 26px; border-radius: 8px; } .sidenav .ni span { font-size: 13px; }
.sidebar { padding: 8px; } .side-status { display: none; }
/* v20: компактная сетка месяца */
.layout > .panel .cgrid:not(.cgrid-mini) .day { aspect-ratio: auto; min-height: 62px; height: 62px; justify-content: flex-start; padding-top: 7px; font-size: .98rem; border-radius: 10px; }
.layout > .panel .cgrid:not(.cgrid-mini) .cgrid-head, .layout > .panel .cgrid:not(.cgrid-mini) .cgrid-body { gap: 4px; }
.day .dn { display: block; max-width: 94%; margin-top: 2px; font-size: .64rem; font-weight: 600; line-height: 1.15; color: var(--muted); text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.day.holiday-off .dn { color: var(--red); }
.day.holiday .dots, .day:has(.dn) .dots { display: none; }
@media (max-width: 700px) { .day .dn { display: none; } .layout > .panel .cgrid:not(.cgrid-mini) .day { height: 48px; min-height: 48px; } .day:has(.dn) .dots { display: flex; } }

/* v21: широкие виджеты в несколько колонок, компактный подвал */
.layout.layout-single > .col-main { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); align-items: stretch; }
.layout.layout-single > .col-main > * { margin: 0; min-width: 0; }
.layout.layout-single > .col-main > .panel, .layout.layout-single > .col-main > .ny-card { grid-column: 1 / -1; }
.sitefooter { padding: 22px var(--gap) 14px; }
.foot-grid { grid-template-columns: minmax(180px, 1.2fr) repeat(5, auto); gap: 18px 36px; align-items: start; }
.foot-brand p { margin-top: 8px; font-size: .86rem; }
.foot-col h2 { margin-bottom: 6px; } .foot-col a { padding: 1px 0; font-size: .88rem; }
.foot-meta { margin-top: 14px; padding-top: 10px; }
@media (min-width: 1100px) { .foot-col:has(a:nth-child(n+8)) { column-count: 2; column-gap: 28px; } }
@media (max-width: 1100px) { .foot-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.layout.layout-single > .col-aside { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); align-items: stretch; }
.layout.layout-single > .col-aside > * { margin: 0; min-width: 0; }

/* v23: графики смен */
.ha-form [hidden] { display: none !important; }
.sch-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--gap); margin: 6px 0 var(--gap); }
.sch-step { display: flex; gap: 12px; background: var(--card); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow, 0 6px 20px -14px rgba(20,30,80,.3)); }
.sch-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; }
.sch-step .hint { margin: 6px 0; }
.sch-pills, .sch-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sch-pill { display: flex; flex-direction: column; align-items: center; padding: 6px 14px; border-radius: 12px; background: var(--bg2); color: var(--ink); font-weight: 800; line-height: 1.15; }
.sch-pill small { font-weight: 600; font-size: .66rem; color: var(--muted); } .sch-pill:hover { text-decoration: none; filter: brightness(.97); }
.sch-pill.on { background: var(--grad); color: #fff; } .sch-pill.on small { color: rgba(255,255,255,.85); }
.sch-picked { margin: 6px 0 0; }
.day.shift-start { outline: 3px solid var(--orange); outline-offset: -3px; }
.day.shift-start::after { content: "старт"; position: absolute; bottom: 4px; font-size: .6rem; font-weight: 700; }
.legend-dot.start { background: transparent; border: 2px solid var(--orange); box-sizing: border-box; }

/* v24 */
.ha-timeline li { position: relative; }
.ha-tools { position: absolute; top: 2px; right: 0; display: flex; gap: 2px; opacity: .35; transition: opacity .15s; }
.ha-timeline li:hover .ha-tools, .ha-tools:focus-within { opacity: 1; }
.ha-tools button { border: 0; background: transparent; cursor: pointer; padding: 2px 6px; border-radius: 6px; color: var(--muted); font-size: .9rem; }
.ha-tools button:hover { background: var(--bg2); color: var(--ink); }
@media (hover: none) { .ha-tools { opacity: .8; } }
.ha-more { border: 0; background: none; color: var(--blue, #1b86d6); cursor: pointer; padding: 6px 0 0; font-weight: 650; }
.ha-bulk { display: grid; gap: 8px; margin-top: 10px; } .ha-bulk textarea { width: 100%; resize: vertical; }
.restore-form { display: grid; gap: 8px; margin-top: 14px; }
/* v25: мобильные правки */
@media (max-width: 700px) {
  .hero > div > p, .hero-copy > p { display: none; }
  .sch-quick .btn { width: 100%; white-space: normal; text-align: center; }
  .sch-step { padding: 12px; } .sch-steps { grid-template-columns: 1fr; }
}
@media (max-width: 700px) { .hero-content > p, .hero-stats { display: none; } .hero { padding-bottom: 18px; } }

.cal-widget .cgrid:not(.cgrid-mini) .day { aspect-ratio: auto; height: 44px; border-radius: 9px; font-size: .92rem; }
.cal-widget .cgrid:not(.cgrid-mini) .cgrid-head, .cal-widget .cgrid:not(.cgrid-mini) .cgrid-body { gap: 4px; }
.priority-band.priority-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.sch-custom { margin-top: 8px; } .sch-custom summary { cursor: pointer; color: var(--blue, #1b86d6); font-weight: 650; }
.sch-custom-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 8px; }
.sch-custom-form label { display: flex; flex-direction: column; gap: 3px; font-size: .84rem; font-weight: 650; color: var(--muted); } .sch-custom-form input { width: 96px; }
.sch-actions { margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
@media print { .sch-steps, .sch-actions, .pager, .day-strip, .calendarlegend span:last-child { display: none !important; } .layout { grid-template-columns: 1fr !important; } .cgrid:not(.cgrid-mini) .day { height: 70px !important; } .day.shift-on { background: #cfe3ff !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* v26: цветные категории событий */
.pi[data-cat="family"] { border-left-color: #e8527a; } .pi[data-cat="health"] { border-left-color: #e5484d; } .pi[data-cat="study"] { border-left-color: #4a6cf0; }
.pi[data-cat="sport"] { border-left-color: #ff7a2f; } .pi[data-cat="finance"] { border-left-color: #b08a00; } .pi[data-cat="travel"] { border-left-color: #12a5d6; } .pi[data-cat="home"] { border-left-color: #8b6bd9; }

/* v27: доступность — контраст (WCAG AA) и различимость ссылок */
:root { --red-text: #c4282f; --green-text: #0b6e5b; }
.weekday.weekend, .day.weekend, .wk-day.weekend .wk-head span, .tag-red, .day.today.weekend { color: var(--red-text); }
.shared-days li.weekend .sd-date { color: var(--red-text); }
.tag-green, .day.pc-work { color: var(--green-text); }
.day.outside { opacity: 1; color: #5b6272; } .day.outside.weekend { color: #9a4a4e; }
.pill-personal[aria-pressed=true] { background: #1b7f38; }
.pill.ds-today, .ds-pill.ds-today { color: #b23a17; }
.callout a, .prose a, .lead a, p > a[target="_blank"], .muted a { text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { :root { --red-text: #ff8a8e; --green-text: #5fd6bc; } .day.outside { color: #9aa0b4; } }
h3.sub { font-size: .9rem; margin: 10px 0 6px; }
.info-card.linkcard h2 { font-size: 1.05rem; margin: 0 0 4px; }
.widget h3.sub { margin: 0 0 4px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; } .widget h3.sub:not(:first-of-type) { margin-top: 10px; }
.day .dn { color: #4d5873; } .day.holiday-off, .day.holiday-off.weekend { color: var(--red-text); }
@media (prefers-color-scheme: dark) { .day .dn { color: #aab2cc; } }
.day.holiday-off .dn { color: var(--red-text); } .day.outside .dn, .day.outside { color: #5b6272; opacity: 1; }
.day.pc-off, .day.pc-off.weekend { color: var(--red-text); }
.day.pc-short { color: #8f3f08; } @media (prefers-color-scheme: dark) { .day.pc-short { color: #ffb26b; } .day.pc-off, .day.pc-off.weekend { color: #ff9a9e; } }
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0; } .pager a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); } .pager a.on, .pager a[aria-current] { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.pager { justify-content: flex-start; }
.day.selected, .day.selected.weekend, .day.selected.holiday-off, .day.selected.pc-off, .day.selected .dn { color: #fff; }
.day-lead { margin: 6px 0 10px; max-width: 70ch; color: var(--muted); line-height: 1.55; }
/* v32: переключатель дней на телефоне — ссылки не ломаются посреди строки */
@media (max-width: 700px) { .date-head .pager { flex-wrap: wrap; } .date-head .pager-mid { order: 3; flex-basis: 100%; text-align: center; line-height: 2; } .date-head .pager-mid a { white-space: nowrap; } .day-lead { font-size: .93rem; } }
@media (max-width: 700px) { .date-head .pager-mid { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 0; } .date-head .pager-mid a { font-size: .9rem; } }
.ics-sub { margin: 8px 0 12px; } .ics-sub small { display: block; margin-top: 2px; }
.vcf-pick { display: block; margin-top: 6px; font-size: .85rem; color: var(--muted); } .vcf-pick input { max-width: 100%; }

.list-filter{width:100%;max-width:420px;padding:9px 14px;border:1px solid var(--line,#d8dff0);border-radius:12px;font:inherit;background:var(--card,#fff);color:inherit}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* v39: виджеты главной и страницы даты — колонки без пустых мест, карточки компактной ширины */
.layout.layout-masonry{display:block;column-count:3;column-gap:var(--gap)}
.layout-masonry>.col-main,.layout-masonry>.col-aside{display:contents}
.layout-masonry .widget,.layout-masonry .panel{break-inside:avoid;margin:0 0 var(--gap)}
@media (max-width:1500px){.layout.layout-masonry{column-count:2}}
@media (max-width:860px){.layout.layout-masonry{column-count:1}}
/* сменные графики: календарь и итоги не растягиваются на весь экран */
.sched-layout{grid-template-columns:minmax(0,680px) minmax(260px,320px)!important;justify-content:start}
.sched-layout .cgrid-body .day{min-height:52px}
.sch-date{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin:10px 0}
.sch-date label{display:flex;flex-direction:column;gap:4px;font-weight:600;font-size:.9rem}
.sch-date input{min-height:40px;border-radius:12px;border:1.5px solid var(--line);padding:6px 12px;background:var(--bg)}
.flag-img{width:22px;height:16px;object-fit:cover;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.12);vertical-align:middle;display:inline-block}

/* v43: отмеченные дни в обзоре года над списками */
.day.mk { background: color-mix(in srgb, var(--blue) 18%, var(--card)); color: #1d4fb8; font-weight: 700; }
.day.mk-vac { background: color-mix(in srgb, var(--green) 22%, var(--card)); color: #14692d; font-weight: 700; }
.day.mk-exam { background: color-mix(in srgb, var(--orange) 26%, var(--card)); color: #8f3f08; font-weight: 700; }
.day.mk.weekend, .day.mk-vac.weekend, .day.mk-exam.weekend { color: inherit; }
@media (prefers-color-scheme: dark) { .day.mk { color: #9bbcff; } .day.mk-vac { color: #7fe39b; } .day.mk-exam { color: #ffb26b; } }
.year-marks { margin: 6px 0 14px; }
.legend-dot.mk { background: var(--blue); } .legend-dot.mk-vac { background: var(--green); } .legend-dot.mk-exam { background: var(--orange); }
.astro-row.k-hol { border-left: 4px solid #7a63e8; } .astro-row.k-pro { border-left: 4px solid #2b6fe0; } .astro-row.k-folk { border-left: 4px solid #3dae5c; }
.astro-row.k-school { border-left: 4px solid #e8851a; } .astro-row.k-name { border-left: 4px solid #ee4f8f; }
.astro-ico img, .astro-ico .flag-img { width: 24px; height: auto; vertical-align: middle; }
.astro-time.small { font-size: .82rem; font-weight: 600; text-align: right; }
.astro-row.k-special { border-left: 4px solid #ee4f8f; }

/* v49: раскладка виджетов скриптом masonry.js — без дыр на любых ширинах */
.layout.layout-masonry.js-m { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); column-count: auto; gap: var(--gap); align-items: start; }
.layout-masonry > .m-col { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.layout-masonry > .m-col > .widget, .layout-masonry > .m-col > .panel { margin: 0; }
