:root {
  --blue: #2b679d;
  --ink: #1c2830;
  --muted: #52616b;
  --line: #d5dde4;
  --bg: #f3f6f8;
  --surface: #fff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 17px/1.45 "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--blue); }
img { max-width: 100%; }
header.top { background: var(--blue); color: #fff; }
header.top a { color: #fff; text-decoration: none; }
.bar, nav { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 18px; }
.bar { padding-bottom: 0; justify-content: space-between; }
.menu { display: block; position: relative; margin-left: auto; flex: 0 0 auto; }
.menu summary {
  display: block;
  list-style: none;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 8px;
  font-size: .95rem;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; }
.menu summary.on { font-weight: 700; }
.menu::details-content { display: block; }
.menu div {
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(20, 40, 60, .18);
  padding: 6px;
  z-index: 20;
}
header.top .menu a {
  display: block;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
header.top .menu a + a { border-top: 1px solid var(--line); }
header.top .menu a:hover, header.top .menu a.on { background: #eef4f9; color: var(--blue); }
nav { padding-top: 8px; }
.brand { font-weight: 700; }
nav a { padding: 4px 0; border-bottom: 2px solid transparent; }
nav a.on { border-bottom-color: #fff; font-weight: 700; }
main { max-width: 980px; margin: 0 auto; padding: 22px 16px 64px; }
body.plain main { max-width: 440px; margin-top: 8vh; }
.card, form.sheet, .sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.card { text-align: center; }
.card img { width: 72px; height: 72px; }
h1 { font-size: 1.6rem; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 22px 0 8px; }
.pagehead { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pagehead h1 { margin: 0; }
h2.group { margin: 26px 0 8px; font-size: .95rem; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
p { margin: 0 0 12px; }
.hint { color: var(--muted); font-size: .92rem; }
.ok, .error { padding: 10px 12px; border-radius: 8px; }
.ok { background: #e7f6ee; color: #145c38; }
.error { background: #fdecec; color: #8d2b2b; }
label { display: block; font-weight: 600; margin: 12px 0; }
label input, label select, label textarea, .langs input, .langs textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.days, .checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.days label, .checks label, .photo span { font-weight: 500; }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 16px 0; padding: 8px 14px 14px; }
legend { font-weight: 700; padding: 0 6px; }
.langgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
button, .btn {
  font: inherit;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
}
button.ghost, a.ghost {
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--blue);
}
button.danger {
  background: #fff;
  color: #8d2b2b;
  border: 1px solid #e3b4b4;
}
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.act { width: 7.5rem; text-align: right; white-space: nowrap; }
.badge {
  display: inline-block;
  font-size: .8rem;
  line-height: 1.3;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7f2ea;
  color: #145c38;
}
.badge.soon { background: #fff4e5; color: #8a5a12; }
.badge.quiet { background: #eef2f5; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.cards a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}
.cards a:hover { border-color: var(--blue); }
.cards .count { font-size: 1.8rem; font-weight: 700; line-height: 1; color: var(--blue); }
.cards strong { color: var(--ink); font-size: 1.05rem; }
.photos { display: flex; flex-wrap: wrap; gap: 10px; }
.photo { width: 140px; font-weight: 500; }
.photo img { width: 140px; height: 96px; object-fit: cover; border-radius: 8px; display: block; }
.mark { display: block; margin: 0 auto 8px; }
@media (max-width: 760px) {
  .langgrid, .row2 { grid-template-columns: 1fr; }
}
