.plate {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 20px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.plate-title { font-weight: 600; color: var(--primary); }
.plate-text { font-size: 12px; color: var(--muted); }
.plate-since { font-size: 12px; color: var(--primary); margin-top: 4px; }
.head > .plate { margin: 4px 12px; }
.plate-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px -10px 0 0; }
.plate-head .plate-title { color: var(--fg); }
.plate-title.plate-quiet { color: var(--fg); }
.plate-quiet ~ .plate-since { color: var(--muted); }
.day {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 12px;
}
.day.today { border-color: var(--today-border, var(--button-border)); }
.day-title {
  padding: 11px 16px 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}
.day.today .day-title { color: var(--primary); }
.day.past .day-title { color: var(--muted); }
.day-summary {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--muted);
}
.day-empty {
  padding: 0 16px 14px;
  font-size: 14px;
  color: var(--muted);
}
.day-note {
  margin-top: -4px;
  padding: 0 16px 8px;
  font-size: 12px;
  color: var(--muted);
}
.lesson {
  display: flex;
  margin: 0 5px 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--tile);
}
.lesson:last-child { margin-bottom: 3px; }
.lesson.now { background: var(--now-bg); }
.lesson-time { width: 4.5em; flex: none; }
.pair { font-size: 11px; line-height: 16px; color: var(--muted); }
.time { white-space: nowrap; }
.time-start { display: block; font-size: 18px; font-weight: 700; line-height: 22px; }
.time-end { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.past .time-start, .past .subject { color: var(--muted); }
.lesson.now .time-start { color: var(--primary); }
.now-label { font-size: 11px; color: var(--primary); }
.now-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--primary);
  vertical-align: 1px;
}
.marks {
  display: flex;
  flex-wrap: wrap;
  width: 66px;
  margin: 6px 0 -4px;
}
.mark {
  display: inline-block;
  box-sizing: border-box;
  min-width: 18px;
  height: 18px;
  margin: 0 4px 4px 0;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--mark-bg);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
}
.mark.own { background: var(--primary); color: var(--on-primary); }
.marks.names { width: auto; margin-right: -4px; }
.marks.names .mark { max-width: calc(100% - 4px); overflow: hidden; text-overflow: ellipsis; }
.lesson.foreign { background: var(--foreign-bg); }
.lesson.foreign .time-start, .lesson.foreign .subject { color: var(--muted); }
.group-name { display: flex; align-items: center; min-width: 0; }
.group-name-text { min-width: 0; overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; }
.group-name .mark { margin: 0 10px 0 0; flex: none; max-width: 88px; overflow: hidden; text-overflow: ellipsis; }
.setting-sub { margin: 12px 0 6px; }
.setting-actions { margin-top: 10px; }
.setting-actions .action { margin: 0; }
.lesson-body {
  flex: 1;
  min-width: 0;
  margin-left: 10px;
}
@media (max-width: 21.25em) {
  .lesson { flex-direction: column; padding: 12px 16px; }
  .lesson-time, .lesson-time.with-marks { width: auto; }
  .lesson-time .pair, .lesson-time .time, .lesson-time .now-label { display: inline; margin-right: 10px; }
  .lesson-time .time-start, .lesson-time .time-end { display: inline; font-size: 14px; color: inherit; }
  .lesson-time .time-end::before { content: "–"; }
  .lesson-time .marks { display: inline-flex; width: auto; margin-top: 0; vertical-align: middle; }
  .lesson-time .marks.names { display: flex; flex-wrap: wrap; max-width: 100%; }
  .lesson-time .mark { margin-bottom: 0; }
  .lesson-body { margin: 6px 0 0; }
}
.subject {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0.5px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.subject.cancelled { text-decoration: line-through; }
.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 4px;
}
.place {
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--primary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.place.muted, .past .place, .foreign .place { color: var(--muted); }
.sub { font-size: 12px; line-height: 16px; color: var(--muted); }
.only-at { margin-bottom: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cancel-note {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--primary);
}
.online-link { margin-top: 0; }
.link-where {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.link-where.foreign { color: var(--primary); }
.link-host, .link-end { white-space: nowrap; }
.link-where.foreign .link-host { white-space: normal; overflow-wrap: anywhere; }
.link-buttons { margin: 6px 0 0; }
.link-button,
.action.link-button {
  display: inline-block;
  height: 28px;
  margin: 0 6px 0 0;
  padding: 0 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  border: 0;
  border-radius: 10px;
  background: var(--foreign-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 28px;
}
.link-button.open,
.action.link-button.open {
  background: var(--online-bg);
  color: var(--online);
}
.past .link-button.open { background: var(--foreign-bg); color: var(--muted); }
