:root {
  color-scheme: light;
  --ink: #182b25;
  --muted: #51685e;
  --green: #173f37;
  --green-light: #e4f0e8;
  --paper: #f7f8f4;
  --line: #dce5dc;
  --white: #fff;
  font: 16px/1.45 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #358164; outline-offset: 3px; }
button:disabled { opacity: .6; cursor: wait; }
a { color: #245c49; text-underline-offset: 3px; }
p { margin: 0; }
.wrap { max-width: 1140px; margin: auto; padding-inline: 28px; }
.masthead { background: var(--green); color: var(--white); }
.masthead-inner, .identity, .masthead-actions { display: flex; align-items: center; gap: 11px; }
.masthead-inner { justify-content: space-between; min-height: 68px; }
.identity { font-size: 19px; font-weight: 750; }
.identity img { width: 35px; height: 35px; border-radius: 9px; }
.masthead-actions .outline { color: var(--white); border-color: #8bb6a7; }
.masthead-actions .subtle { color: #cde4da; }
.outline, .primary, .plain, .subtle { border-radius: 9px; padding: 7px 12px; border: 1px solid transparent; }
.outline { border-color: #94ad9e; color: var(--green); background: transparent; }
.primary { background: var(--green); color: #fff; font-weight: 700; }
.plain, .subtle { color: var(--green); background: transparent; }
.plain:hover, .outline:hover { text-decoration: underline; }
.page-heading { padding-block: 33px 20px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
h1, h2, h3 { margin: 0; line-height: 1.17; }
h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -.045em; }
.page-heading p { margin-top: 5px; color: var(--muted); }
.sections { display: flex; background: #e9efe9; border-radius: 11px; padding: 4px; }
.sections button { border: 0; font-weight: 650; padding: 8px 12px; background: none; border-radius: 8px; color: var(--muted); white-space: nowrap; }
.sections [aria-pressed="true"] { color: var(--green); background: var(--white); box-shadow: 0 1px 3px #154a3020; }
.days { display: flex; gap: 8px; padding: 4px 4px 12px; margin-inline: -4px; overflow-x: auto; scrollbar-color: #bbcebd transparent; }
.day { flex-shrink: 0; min-width: 71px; padding: 9px 8px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); color: var(--ink); }
.day span { display: block; }
.day .number { font-size: 18px; font-weight: 750; }
.day .weekday { font-size: 12px; color: var(--muted); }
.day .indicator { width: 5px; height: 5px; border-radius: 50%; margin: 5px auto 0; background: #4e8e74; }
.day .indicator.empty { background: transparent; }
.day[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--white); }
.day[aria-pressed="true"] .weekday { color: #d5eddf; }
.day[aria-pressed="true"] .indicator { background: #abd4ac; }
.day[aria-pressed="true"] .indicator.empty { background: transparent; }
.chosen { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-block: 24px 15px; }
.chosen h2, dialog h2 { font-size: clamp(20px, 3vw, 27px); letter-spacing: -.025em; }
.toggle { color: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.columns { display: grid; grid-template-columns: 1.13fr 1fr; align-items: start; gap: 16px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 15px; }
.panel h3 { font-size: 17px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.row { padding: 13px 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 9px; }
.row + .row { border-top: 1px solid var(--line); }
.event { grid-template-columns: 53px minmax(0, 1fr) auto; }
.row-title { display: block; font-size: 15px; font-weight: 740; line-height: 1.3; }
.row-desc { color: var(--muted); margin-top: 5px; font-size: 13px; overflow-wrap: anywhere; }
.row-links { margin-top: 7px; display: flex; gap: 3px 9px; flex-wrap: wrap; font-size: 12px; }
.event .hour { display: block; color: var(--green); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.event .minute-end { display: block; color: var(--muted); font-size: 12px; }
.badge { display: inline-block; color: #91631c; background: #f8eed9; padding: 2px 6px; border-radius: 6px; font-size: 11px; font-weight: 730; margin-bottom: 4px; }
.status { width: 112px; border-radius: 8px; padding: 6px 4px; border: 1px solid #c8d8cf; font-size: 12px; color: var(--muted); background: #f4f7f4; }
.status[data-status="Готово"] { color: #155236; background: var(--green-light); }
.status[data-status="Не нужно"] { color: #505d54; background: #edf0ed; }
.status[data-status="Уточнить"] { color: #73480a; background: #fff4db; }
.status[data-status="В работе"] { color: #2d5374; background: #ecf5ff; }
.blank { padding: 17px; color: var(--muted); }
.past { margin-top: 15px; }
.bottom-actions { display: flex; justify-content: end; padding-block: 15px 28px; }
.bottom-actions button { text-decoration: underline; text-underline-offset: 4px; font-size: 14px; }
.login { max-width: 410px; padding: 24px; margin: 48px auto; }
.login h1 { font-size: 32px; margin-bottom: 18px; }
.login label, dialog label { display: block; font-weight: 650; margin-bottom: 5px; }
.login input, #lead { display: block; min-width: 145px; padding: 9px 11px; border: 1px solid #94ad9e; border-radius: 8px; color: var(--ink); background: var(--white); }
.login input { width: 100%; margin-bottom: 12px; }
.error { margin-top: 6px; color: #a03327; font-size: 14px; }
dialog { width: min(480px, calc(100% - 24px)); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
dialog::backdrop { background: #0d201baa; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
dialog p { margin: 9px 0 13px; color: var(--muted); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#notice { position: fixed; z-index: 2; bottom: 16px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); color: #fff; background: var(--green); padding: 11px 17px; border-radius: 9px; box-shadow: 0 4px 20px #163e3a25; }
.materials { padding: 3px 16px; }
.material { display: flex; justify-content: space-between; gap: 8px; padding: 11px 0; }
.material + .material { border-top: 1px solid var(--line); }
.material span { color: var(--muted); font-size: 13px; text-align: right; }
@media(max-width: 735px) {
  .wrap { padding-inline: 15px; }
  .page-heading { align-items: start; flex-direction: column; padding-top: 22px; }
  .columns { grid-template-columns: 1fr; gap: 13px; }
  .day { min-width: 63px; }
  .chosen { padding-block: 17px 12px; }
}
@media(max-width: 410px) {
  .masthead-actions { gap: 3px; }
  .masthead-actions button { padding-inline: 7px; font-size: 13px; }
  .row { padding-inline: 10px; }
  .event { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .status { width: 101px; font-size: 11px; }
  .toggle { font-size: 12px; }
}
