:root {
  color-scheme: light;
  --pharmacy-green: #1d5104;
  --light-green: #c6e6a4;
  --ink: #1c2c18;
  --muted: #53634d;
  --documentation-red: #a32635;
  --documentation-tint: #fbecef;
  --border: #dce7d5;
  font-family: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  background: #f5f8f2;
  color: var(--ink);
}
.sidebar {
  background: #17331f;
  padding: 1.5rem .8rem;
  color: #f2f4ed;
}
.brand {
  display: block;
  width: min(100%, 12rem);
  margin: 0 .65rem;
  padding: .75rem;
  border-radius: .65rem;
  background: #fff;
}
.brand-caption {
  width: min(100%, 12rem);
  margin: .32rem .65rem 1.1rem;
  text-align: center;
  color: #c6d8b9;
  font-size: .8rem;
  font-weight: 600;
}
.brand-mark {
  display: block;
  position: relative;
  aspect-ratio: 1126 / 376;
  overflow: hidden;
}
/* Show the horizontal wordmark from the supplied brand sheet. */
.brand-mark img {
  position: absolute;
  width: 157.55%;
  max-width: none;
  height: auto;
  left: -6.75%;
  top: -43.62%;
}
a { color: inherit; }
.brand, nav a, .card { text-decoration: none; }
nav { display: grid; gap: .2rem; }
nav a {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  align-items: center;
  gap: .8rem;
  min-height: 3rem;
  padding: .65rem .8rem;
  border: 1px solid transparent;
  border-radius: .75rem;
  font-weight: 600;
  line-height: 1.35;
}
nav a:hover { background: #ffffff12; }
nav a[aria-current="page"] {
  background: #345031;
  border-color: #647c58;
  color: #fff;
}
main { padding: clamp(1.25rem, 5vw, 4rem); }
.content { max-width: 60rem; margin-inline: auto; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.05em; margin: 0 0 1.75rem; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.card, .panel {
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: white;
  box-shadow: 0 .4rem 1.6rem #1d51040d;
}
.card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; min-height: 8rem; }
.card:hover { border-color: var(--pharmacy-green); background: #fbfef8; }
.card-copy { display: grid; gap: .3rem; }
.card-copy strong { font-size: 1.2rem; line-height: 1.2; }
.card-copy span, .panel p { color: var(--muted); }
.panel p { margin-top: 0; }
.panel a, .arrow { color: var(--pharmacy-green); font-weight: 700; }
.arrow { font-size: 1.45rem; }
.icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: .7rem;
  background: #e5f3d7;
  color: var(--pharmacy-green);
}
.icon::before {
  content: "";
  width: 1.05rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-radius: .2rem;
}
.board::before { background: linear-gradient(currentColor, currentColor) center / .55rem 2px no-repeat; }
.calendar::before { background: linear-gradient(currentColor, currentColor) center .22rem / 100% 2px no-repeat; }
:focus-visible { outline: 3px solid #507f32; outline-offset: 4px; }
.sidebar :focus-visible { outline-color: white; }
@media (max-width: 880px) {
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { display: block; }
  .sidebar { padding: 1rem; }
  .brand, .brand-caption { width: min(100%, 10.5rem); }
  main { padding-top: 1.75rem; }
}

.documentation { margin-top: 2.25rem; }
.documentation h2 { margin: 0 0 1rem; font-size: 1.4rem; }
.documentation h2, .documentation .card, .documentation .arrow { color: var(--documentation-red); }
.documentation .card:hover { border-color: var(--documentation-red); background: #fff8f9; }
.documentation .icon { color: var(--documentation-red); background: var(--documentation-tint); }
.nav-group-title {
  padding: .15rem .85rem .35rem;
  color: #c6d8b9;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.nav-documentation {
  display: grid;
  gap: .2rem;
  margin-top: .8rem;
  padding-top: .9rem;
  border-top: 1px solid #74906b;
  color: #ff9fa7;
}
.nav-documentation .nav-group-title { color: inherit; }
.nav-documentation a[aria-current="page"] {
  background: #543737;
  border-color: #a6656a;
  color: #ffc2c7;
}
.nav-icon {
  width: 1.4rem;
  height: 1.4rem;
  background: transparent;
  color: inherit;
}
.nav-icon::before { width: .85rem; height: .85rem; }
.nav-icon.overview::before {
  background:
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}
.nav-icon.vacation::before {
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  box-shadow: 0 -.55rem 0 -.31rem, 0 .55rem 0 -.31rem, -.55rem 0 0 -.31rem, .55rem 0 0 -.31rem;
}
.nav-icon.record::before {
  width: .65rem;
  background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 4px) center / .35rem .45rem no-repeat;
}
.nav-icon.veterinary::before {
  width: 1rem;
  height: 1rem;
  border: 0;
  background:
    linear-gradient(currentColor, currentColor) center / .2rem 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% .2rem no-repeat;
}

.board-form h2, .notice-list h2 { margin: 0 0 1rem; font-size: 1.35rem; }
.board-form form { display: grid; gap: .55rem; }
.board-form label { font-weight: 700; }
.board-form input, .board-form textarea, .board-form select {
  width: 100%;
  margin-bottom: .5rem;
  padding: .7rem .8rem;
  border: 1px solid #899b81;
  border-radius: .5rem;
  color: var(--ink);
  background: white;
  font: inherit;
}
.board-form textarea { resize: vertical; }
.board-form button {
  justify-self: start;
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border: 0;
  border-radius: .5rem;
  background: var(--pharmacy-green);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.board-form button:hover { background: #17331f; }
.board-form .board-error { color: var(--documentation-red); }
.board-form .board-feedback { color: var(--pharmacy-green); }
.notice-list { margin-top: 2rem; }
.notice + .notice { margin-top: .8rem; }
.notice h3 { margin: 0 0 .3rem; overflow-wrap: anywhere; }
.notice time, .board-empty { color: var(--muted); }
.notice time { font-size: .85rem; }
.notice p { margin: .7rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }


.board-actions { display: flex; align-items: end; flex-wrap: wrap; gap: .8rem 1.25rem; }
.notice-priorities { min-width: 0; margin: 0; padding: 0; border: 0; }

.notice-priorities div { display: flex; flex-wrap: wrap; gap: .25rem .8rem; }
.notice-priorities label { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; }
.notice-priorities input { width: auto; margin: 0; padding: 0; accent-color: var(--pharmacy-green); }
.notice--wichtig { border-left: 8px solid #c62832; }
.notice--mittel { border-left: 8px solid #ef8b24; }
.notice--nebeninfo { border-left: 8px solid #dcefcf; }
.notice .notice-author { margin: 0 0 .35rem; color: var(--muted); font-size: .85rem; }
.notice-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .65rem; }
.notice-meta span { color: var(--muted); font-size: .85rem; font-weight: 700; }


.notice-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; margin-top: .8rem; }
.notice-actions button {
  padding: .35rem 0;
  border: 0;
  background: transparent;
  color: var(--pharmacy-green);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.notice-done {
  padding: .18rem .55rem;
  border-radius: 1rem;
  background: #e5f3d7;
  color: var(--pharmacy-green);
  font-size: .85rem;
}
.board-actions > a { align-self: center; }

.notice--completed { position: relative; }
.notice--completed::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgb(80 83 80 / 14%);
  pointer-events: none;
}
.notice-delete-confirm {
  flex-basis: 100%;
  padding: .65rem .8rem;
  border: 1px solid #e3b4ba;
  border-radius: .5rem;
  background: #fff8f9;
}
.notice-delete-confirm p { margin: 0 0 .2rem; font-weight: 700; }
.notice-delete-confirm button { color: var(--documentation-red); margin-right: .75rem; }

.board-form #roster-note { margin: -.35rem 0 .45rem; color: var(--muted); }

.notice-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-bottom: 1rem;
}
.notice-list-header h2 { margin: 0; }
.notice-list-header a { color: var(--pharmacy-green); font-weight: 700; }

nav a[aria-current="location"] { background: #345031; border-color: #647c58; color: #fff; }
.vacation-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.5rem; }
.vacation-nav a { display: inline-flex; min-height: 2.6rem; background: white; border-color: var(--border); }
.vacation-nav a:hover { border-color: var(--pharmacy-green); }
.vacation-nav a[aria-current="page"] { background: var(--pharmacy-green); }
.vacation-note { color: var(--muted); font-size: .9rem; }
.vacation-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 1rem; background: white; }
.vacation-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.vacation-table th, .vacation-table td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}
.vacation-table thead th { background: #e9f2e3; color: var(--pharmacy-green); font-size: .9rem; }
.vacation-table th:first-child { text-align: left; }
.vacation-table tbody tr:last-child > * { border-bottom: 0; }
.vacation-table td:last-child { font-weight: 700; }

.plan-filters, .plan-entry-actions, .plan-entry-actions form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .65rem;
}
.plan-filters { margin-bottom: 1.5rem; }
.plan-filters label, .plan-fields label { display: block; margin-bottom: .35rem; font-weight: 700; }
.plan-filters select, .plan-filters button {
  min-height: 2.65rem;
  padding: .4rem .65rem;
  border: 1px solid #899b81;
  border-radius: .5rem;
  background: white;
  color: var(--ink);
  font: inherit;
}
.plan-filters button { background: var(--pharmacy-green); color: white; cursor: pointer; }
.plan-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.plan-section { margin: 1.5rem 0; }
.plan-section h2 { margin: 0 0 .65rem; }
.plan-calendar th, .plan-calendar td { padding: .45rem .5rem; text-align: center; }
.plan-calendar thead th:first-child, .plan-calendar tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 1px solid var(--border);
}
.plan-calendar tbody th { background: white; font-size: .88rem; }
.plan-calendar td { min-width: 2rem; border-left: 1px solid var(--border); }
.plan-chip {
  display: inline-block;
  margin: .1rem;
  padding: .2rem .4rem;
  border-radius: .4rem;
  background: #dcefcf;
  color: #1d5104;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}
.plan-chip--included { background: #dbe7f2; color: #213f65; }
.plan-legend { display: flex; flex-wrap: wrap; gap: .35rem; }
.plan-entry + .plan-entry { margin-top: .6rem; }
.plan-entry h3 { margin: 0 0 .4rem; }
.plan-entry p { margin: .3rem 0; }
.plan-entry-actions { margin-top: .6rem; align-items: center; }
.plan-entry-actions button {
  padding: .3rem .5rem;
  border: 1px solid var(--border);
  border-radius: .4rem;
  font: inherit;
  background: #f5f8f2;
  color: var(--pharmacy-green);
  cursor: pointer;
}
.plan-error { color: var(--documentation-red); font-weight: 700; }
.plan-feedback { color: var(--pharmacy-green); font-weight: 700; }
@media (max-width: 640px) {
  .plan-fields { grid-template-columns: 1fr; }
}

.plan-calendar { table-layout: fixed; min-width: 1100px; }
.plan-calendar thead th:first-child { width: 210px; }
.plan-calendar td.plan-timeline-cell { padding: 0; }
.plan-timeline {
  position: relative;
  background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--period-width) - 1px), var(--border) calc(var(--period-width) - 1px), var(--border) var(--period-width));
}
.plan-bar {
  position: absolute;
  display: block;
  height: 22px;
  padding: 2px 5px;
  overflow: hidden;
  border-radius: 4px;
  background: #b9dba3;
  color: #17331f;
  font-size: .73rem;
  line-height: 18px;
  white-space: nowrap;
  text-align: left;
}
.plan-calendar .plan-department th {
  position: static;
  background: #e9f2e3;
  color: var(--pharmacy-green);
  text-align: left;
  padding: .7rem .8rem;
}

.vacation-planner main { min-width: 0; padding: clamp(1rem, 2vw, 2rem); }
.vacation-planner .content { max-width: none; width: 100%; }
.plan-calendar .plan-department th { padding-inline: 0; }
.plan-department-label {
  position: sticky;
  left: 0;
  display: block;
  width: 210px;
  padding-inline: .8rem;
  box-sizing: border-box;
  background: #e9f2e3;
}
.plan-calendar tbody tr:not(.plan-department) > th {
  z-index: 2;
  text-align: left;
  box-shadow: 1px 0 0 var(--border);
}

.plan-week-header { position: relative; height: 26px; }
.plan-calendar .plan-week-row td { padding: 0; background: #f1f6ec; }
.plan-week {
  position: absolute;
  top: 0;
  height: 100%;
  overflow: hidden;
  border-left: 1px solid #bccdb1;
  font-size: .65rem;
  line-height: 26px;
  text-align: center;
}
.plan-week-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d4dfcd;
  pointer-events: none;
}
.plan-bar { border: 0; cursor: pointer; font-family: inherit; }
.plan-tooltip {
  position: fixed;
  z-index: 100;
  max-width: calc(100vw - 16px);
  padding: .65rem .85rem;
  border-radius: .5rem;
  background: #17331f;
  color: white;
  box-shadow: 0 4px 18px #0003;
  font-size: .9rem;
  pointer-events: none;
}

.plan-timeline { background-image: none; }
.plan-calendar .plan-department th,
.plan-department-label { background: #17331f; color: white; }
.plan-tooltip { pointer-events: auto; }
.plan-tooltip a { display: inline-block; margin-top: .45rem; color: #dcefcf; font-weight: 700; }
.icon.vacation { position: relative; }
.icon.vacation::before {
  content: "";
  width: 1.15rem;
  height: .6rem;
  border: 2px solid currentColor;
  border-radius: 1rem 1rem 0 0;
  background: none;
  box-shadow: none;
  transform: rotate(-20deg);
  margin-top: -.4rem;
}
.icon.vacation::after {
  content: "";
  position: absolute;
  width: .4rem;
  height: .75rem;
  top: 47%;
  left: 48%;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 .3rem 0;
  transform: rotate(-20deg);
}

.plan-calendar .plan-department th,
.plan-department-label { background: #24652b; color: #fff; }
.plan-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#plan-remaining {
  display: block;
  min-height: 2.8rem;
  padding: .7rem .8rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  background: #e9f2e3;
  color: var(--pharmacy-green);
  font-weight: 700;
}
@media (max-width: 1000px) {
  .plan-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .plan-fields { grid-template-columns: 1fr; }
}

.plan-publish { margin: .7rem 0 1rem; }
.plan-tooltip form { display: inline-block; margin-left: 1rem; }
.plan-tooltip button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffc2c7;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.plan-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.year-navigation { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.plan-toolbar .year-navigation { margin-bottom: 0; }
.year-navigation .year-arrow {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .4rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  background: white;
  color: var(--pharmacy-green);
  font-size: 1.2rem;
  text-decoration: none;
}
.year-navigation .disabled { opacity: .35; }
.plan-input-button {
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border: 0;
  border-radius: .5rem;
  background: var(--pharmacy-green);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.plan-toolbar .plan-publish { margin: 0; }
.vacation-planner .plan-input-button,
.vacation-planner .board-form button[value="veroeffentlicht"],
.vacation-planner .board-form button[value="gespeichert"] { background: #b32635; color: white; }
.vacation-planner .plan-input-button:hover,
.vacation-planner .board-form button[value="veroeffentlicht"]:hover,
.vacation-planner .board-form button[value="gespeichert"]:hover { background: #8f1d2a; }

.vacation-table .vacation-department th {
  background: #24652b;
  color: white;
  text-align: left;
  padding: .7rem 1rem;
}

/* Annual vacation closure in January, February and December. */
.plan-calendar .plan-timeline,
.plan-calendar .plan-week-header {
  background-image: linear-gradient(to right,
    #dfe2df 0%, #dfe2df 16.666667%,
    transparent 16.666667%, transparent 91.666667%,
    #dfe2df 91.666667%, #dfe2df 100%);
}
.plan-calendar thead tr:first-child th:nth-child(2),
.plan-calendar thead tr:first-child th:nth-child(3),
.plan-calendar thead tr:first-child th:nth-child(13) {
  background: #dfe2df;
  color: #374637;
}
.plan-calendar thead tr:first-child th:nth-child(2)::after,
.plan-calendar thead tr:first-child th:nth-child(3)::after,
.plan-calendar thead tr:first-child th:nth-child(13)::after {
  content: "Urlaubssperre";
  display: block;
  margin-top: .25rem;
  font-size: .63rem;
  font-weight: 500;
}

#publish-code-dialog {
  width: min(26rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  color: var(--ink);
}
#publish-code-dialog::backdrop { background: rgb(0 0 0 / 45%); }
#publish-code-dialog h2 { margin: 0 0 1rem; }
#publish-code-dialog #publish-code-cancel { background: #e9ede6; color: var(--ink); }

.vacation-new {
  display: inline-block;
  padding: .12rem .4rem;
  margin-left: .35rem;
  border-radius: .35rem;
  background: #b32635;
  color: white;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.3;
  vertical-align: middle;
}

.plan-bar--new { background: #b32635; color: white; }

.notice-readers { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.notice-reader {
  min-height: 2.3rem;
  padding: .4rem .65rem;
  border: 0;
  border-radius: .4rem;
  background: #b32635;
  color: white;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}
.notice-reader--seen { background: #24652b; }

.notice-menu-new {
  display: inline-block;
  padding: .12rem .4rem;
  margin-left: .3rem;
  border-radius: .35rem;
  background: #b32635;
  color: white;
  font-size: .72rem;
  font-weight: 800;
  vertical-align: middle;
}
.notice-menu-pending {
  display: inline-block;
  width: .65rem;
  height: .65rem;
  margin-left: .4rem;
  border-radius: 50%;
  background: #f39928;
  vertical-align: middle;
}

.duty-week { width: 100%; min-width: 1100px; border-collapse: collapse; table-layout: fixed; }
.duty-week th, .duty-week td { padding: .65rem; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); vertical-align: top; }
.duty-week thead th { background: #e9f2e3; color: var(--pharmacy-green); text-align: center; }
.duty-week th:first-child { width: 145px; }
.duty-week tbody th { background: #24652b; color: white; text-align: left; }
.duty-week th:first-child { position: sticky; left: 0; z-index: 1; }
.duty-week small { display: block; margin-top: .3rem; font-weight: 400; }
.duty-slot { min-height: 2.4rem; margin-bottom: .35rem; padding: .55rem; border: 1px solid var(--border); border-radius: .4rem; color: var(--muted); background: #f8faf6; }
.duty-slot:last-child { margin-bottom: 0; }

button.duty-slot { width: 100%; font: inherit; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
button.duty-slot:hover { border-color: var(--pharmacy-green); background: #e9f2e3; }
#duty-dialog { width: min(30rem, calc(100vw - 2rem)); border: 1px solid var(--border); border-radius: 1rem; padding: 1.5rem; color: var(--ink); }
#duty-dialog::backdrop { background: rgb(0 0 0 / 45%); }
#duty-dialog h2 { font-size: 1.2rem; margin: 0 0 1rem; }

.duty-cell { display: flex; gap: .35rem; align-items: center; }
.duty-cell button.duty-slot { flex: 1; min-width: 0; margin: 0; min-height: 2.1rem; padding: .35rem; font-size: .8rem; }
.duty-color-form { flex: 0 0 1.8rem; margin: 0; }
.duty-color {
  display: block;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid #71806b;
  border-radius: .15rem;
  color: transparent;
  cursor: pointer;
  appearance: none;
}
.duty-color option { color: #172017; }
.duty-color:disabled { opacity: .4; cursor: default; }
.duty-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.25rem; border: 1px solid #71806b; }
.duty-legend-item { padding: .7rem .85rem; color: #172017; border: 1px solid #71806b; line-height: 1.5; }
@media (max-width: 700px) { .duty-legend { grid-template-columns: 1fr; } }

.duty-publish { margin-bottom: 1rem; }
.duty-person { flex: 1; min-width: 0; font-size: .8rem; overflow-wrap: anywhere; }
.duty-swatch { display: inline-block; flex: 0 0 1.8rem; height: 1.8rem; border: 1px solid #71806b; border-radius: .15rem; }

.duty-color { border: 0; border-radius: 0; }
.duty-color:disabled { opacity: 1; }
.duty-swatch { border: 0; border-radius: 0; }

#duty-dialog #duty-employee[size] {
  height: auto;
  max-height: 55vh;
  padding: .3rem;
}
#duty-dialog #duty-employee option { padding: .3rem .45rem; }
#duty-dialog #duty-employee optgroup { padding-top: .3rem; }

.duty-legend {
  width: calc(50% + 72.5px);
  min-width: 622.5px;
  grid-template-columns: calc((100% - 145px) / 3 + 145px) repeat(2, minmax(0, 1fr));
}
.duty-legend-item { padding: .45rem .6rem; font-size: .85rem; }

.duty-legend {
  width: calc((100% - 145px) / 6 + 145px);
  min-width: 304.166667px;
  grid-template-columns: minmax(0, 1fr);
}

.duty-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.duty-toolbar .duty-publish { margin: 0; }
.duty-copy { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.duty-copy select { width: auto; margin: 0; }

.duty-copy select { border: 0; box-shadow: none; background: transparent; }

.duty-copy label { font-weight: 400; }
.duty-page .board-form button,
.duty-page .plan-filters button {
  background: #b32635;
  color: white;
}
.duty-page .board-form button:hover,
.duty-page .plan-filters button:hover { background: #8f1d2a; }

#duty-publish-dialog {
  width: min(26rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  color: var(--ink);
}
#duty-publish-dialog::backdrop { background: rgb(0 0 0 / 45%); }
#duty-publish-dialog h2 { margin: 0 0 1rem; font-size: 1.2rem; }

.duty-copy-source-group {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 2.75rem;
  padding: 0 .75rem;
  border: 1px solid #b32635;
  border-radius: .5rem;
  box-sizing: border-box;
}
.duty-copy-source-group label { white-space: nowrap; }
.duty-copy-source-group select { height: 100%; min-height: 0; padding-block: 0; margin: 0; }
.duty-copy > button { height: 2.75rem; box-sizing: border-box; }

.duty-copy { gap: 0; flex-wrap: nowrap; }
.duty-copy-source-group {
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.duty-copy > button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.duty-color option[value=""] { background: #fff; color: #000; }
.duty-color option:checked {
  background: #000 !important;
  color: #fff !important;
}

.duty-analysis { margin-top: 1.4rem; font-family: "Segoe UI", system-ui, sans-serif; font-size: .75rem; }
.duty-analysis h2 { font-size: 1rem; margin: 0 0 .4rem; }
.duty-analysis > p { margin: 0 0 .8rem; color: var(--muted); }
.duty-analysis-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.duty-analysis-team { min-width: 0; background: white; border: 1px solid var(--border); border-radius: .5rem; padding: .6rem; }
.duty-analysis-team h3 { font-size: .85rem; margin: 0 0 .55rem; color: var(--pharmacy-green); }
.duty-analysis-scroll { overflow-x: auto; }
.duty-analysis table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.duty-analysis th, .duty-analysis td { padding: .4rem .25rem; border-bottom: 1px solid var(--border); text-align: right; }
.duty-analysis thead th { font-size: .66rem; vertical-align: bottom; }
.duty-analysis th:first-child { text-align: left; }
.duty-analysis tbody th { font-weight: 500; }
.duty-analysis td { white-space: nowrap; }
.duty-analysis td:last-child { font-weight: 700; }
@media (max-width: 1300px) { .duty-analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .duty-analysis-grid { grid-template-columns: 1fr; } }

.balance-indicator {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  margin-left: .2rem;
  border-radius: 50%;
  vertical-align: middle;
}
.balance-indicator--red { background: #c62832; }
.balance-indicator--green { background: #278039; }

.duty-period-form { position: relative; flex: 0 0 1.65rem; height: 1.8rem; margin: 0; }
.duty-period-label { display: inline-flex; align-items: center; justify-content: center; min-width: 1.65rem; height: 1.8rem; font-size: .7rem; }
.duty-period-form select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.duty-period-form:focus-within { outline: 2px solid #507f32; border-radius: .2rem; }

/* Also hide legends retained inside previously published snapshots. */
.duty-legend { display: none; }

.duty-color-form:has(option[value=""]:checked) { position: relative; }
.duty-color-form:has(option[value=""]:checked) .duty-color {
  background-color: #f0f1ef !important;
}
.duty-color-form:has(option[value=""]:checked)::after {
  content: "...";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8b9087;
  font-size: .8rem;
  pointer-events: none;
}
.duty-period-form .duty-period-label:empty {
  background: #f0f1ef;
}
.duty-period-form .duty-period-label:empty::before {
  content: "...";
  color: #8b9087;
  font-size: .8rem;
}

.duty-legend.duty-legend-published { display: grid; }

.plan-calendar thead a { color: inherit; text-underline-offset: .2rem; }
.plan-calendar--month .plan-timeline,
.plan-calendar--month .plan-week-header { background-image: var(--month-closure); }
.plan-calendar--month thead tr:first-child th:nth-child(n) {
  background: #e9f2e3;
  color: var(--pharmacy-green);
}
.plan-calendar--month thead tr:first-child th::after { content: none; }
.plan-calendar--month { min-width: 1600px; }
.plan-toolbar a.plan-input-button { display: inline-flex; align-items: center; text-decoration: none; }

.plan-calendar tbody tr:not(.plan-department) > th,
.plan-employee-link,
.duty-slot,
.duty-person,
.duty-analysis tbody th,
.vacation-table tbody tr:not(.vacation-department) > th,
.plan-entry h3,
.notice-reader { font-weight: 400; }
.plan-calendar--month thead th { border-right: 1px solid #d4dfcd; }
.plan-calendar--month thead tr:first-child th::after { content: none !important; }

.plan-calendar.plan-calendar--month {
  min-width: 1044px;
  width: 1044px;
}
.plan-calendar--month thead tr:first-child th { font-weight: 300; }

.plan-calendar--month thead small { display: block; font-size: .65rem; font-weight: 400; margin-top: .2rem; }
.plan-day-shade { position: absolute; inset-block: 0; pointer-events: none; }
.plan-day-shade--weekend { background: rgb(100 105 100 / 9%); }
.plan-day-shade--holiday { background: rgb(185 45 45 / 11%); }
.plan-calendar--month thead tr:first-child th.calendar-weekend,
.duty-week th.calendar-weekend,
.duty-week td.calendar-weekend { background: #eeeeec; }
.plan-calendar--month thead tr:first-child th.calendar-holiday,
.duty-week th.calendar-holiday,
.duty-week td.calendar-holiday { background: #fae5e5; color: #8f1d2a; }
.holiday-mark { display: block; color: #b32635; font-size: .6rem; line-height: 1; }
.calendar-holiday-note { font-size: .8rem; color: #8f1d2a; }
.duty-week .duty-holiday-name { font-size: .7rem; color: #8f1d2a; }

#duty-employee option.duty-employee-on-vacation { color: #a22231; background: #fae5e5; }

#duty-confirm-dialog {
  width: min(30rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  color: var(--ink);
  background: white;
}
#duty-confirm-dialog::backdrop { background: rgb(0 0 0 / 45%); }
#duty-confirm-dialog h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
#duty-confirm-dialog p { line-height: 1.6; margin: 0 0 1rem; }
.duty-clear { margin: 0; }

.duty-week th.calendar-weekend { background: #e9f2e3; }
.duty-week td.calendar-weekend { background: white; }

#vacation-delete-dialog {
  width: min(30rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: white;
  color: var(--ink);
}
#vacation-delete-dialog::backdrop { background: rgb(0 0 0 / 45%); }
#vacation-delete-dialog h2 { margin: 0 0 .75rem; font-size: 1.2rem; }
#vacation-delete-dialog p { margin: 0 0 1rem; line-height: 1.6; }
#vacation-delete-dialog button { background: #b32635; color: white; }
#vacation-delete-dialog button:hover { background: #8f1d2a; }

.plan-day-targets { position: absolute; inset: 0; display: grid; }
.plan-day-target { display: block; min-width: 0; }
.plan-day-target:hover { background: rgb(36 101 43 / 12%); }
.plan-day-target:focus-visible { outline: 2px solid #24652b; outline-offset: -2px; }
.plan-calendar--month .plan-bar { z-index: 1; }
.plan-week-line { pointer-events: none; }

html { scrollbar-gutter: stable; }
.vacation-page main { min-width: 0; padding: clamp(1rem, 2vw, 2rem); }
.vacation-page .content { max-width: none; width: 100%; margin: 0; }
.vacation-page .vacation-nav { margin-top: 0; justify-content: flex-start; align-items: stretch; }

.vacation-page main { --vacation-page-padding: clamp(1rem, 2vw, 2rem); padding: var(--vacation-page-padding); }
.vacation-page .vacation-nav {
  margin-top: calc(-1 * var(--vacation-page-padding));
  margin-left: calc(-1 * var(--vacation-page-padding));
  margin-right: calc(-1 * var(--vacation-page-padding));
  margin-bottom: 1.5rem;
  padding: 1rem var(--vacation-page-padding);
  background: #e8eae6;
  border-bottom: 2px solid #24652b;
  width: calc(100% + 2 * var(--vacation-page-padding));
  box-sizing: border-box;
}

.vacation-page .plan-toolbar .plan-publish { margin-left: auto; }

.published-calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.published-calendar-toolbar h2 { margin: 0; }
.published-pdf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border-radius: .5rem;
  background: #b32635;
  color: white;
  font-weight: 700;
  text-decoration: none;
  margin-left: auto;
}
.published-pdf-button:hover { background: #8f1d2a; }

.vacation-page h1:has(+ .publication-version) { margin-bottom: .25rem; }
.publication-version { margin-top: 0; margin-bottom: 1.25rem; }

.plan-release-navigation { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: .65rem; }
.vacation-page .plan-release-navigation .plan-publish { margin: 0; }
.plan-release-navigation .year-navigation { margin: 0; }
.vacation-page .plan-toolbar { align-items: flex-start; }

.published-download-navigation { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: .65rem; }
.published-download-navigation .year-navigation { margin: 0; }
.published-download-navigation p { margin: 0; }
.published-calendar-toolbar { align-items: flex-start; }

.duty-page main { --duty-page-padding: clamp(1rem, 2vw, 2rem); padding: var(--duty-page-padding); }
.duty-page .vacation-nav {
  margin-top: calc(-1 * var(--duty-page-padding));
  margin-left: calc(-1 * var(--duty-page-padding));
  margin-right: calc(-1 * var(--duty-page-padding));
  margin-bottom: 1.5rem;
  padding: 1rem var(--duty-page-padding);
  background: #e8eae6;
  border-bottom: 2px solid #24652b;
  width: calc(100% + 2 * var(--duty-page-padding));
  box-sizing: border-box;
}

.plan-bar--seen { background: #916747; color: white; }
.vacation-planner-hints { font-size: .78rem; line-height: 1.5; margin: -1rem 0 1.25rem; }
.vacation-planner-hints p { margin: .15rem 0; }
.vacation-hint-new { color: #b32635; }
.vacation-hint-seen { color: #845333; }

.vacation-planner-hints { line-height: 1.2; color: #000; }
.vacation-planner-hints p { margin: 0; color: #000; }

.plan-release-navigation,
.published-download-navigation {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.plan-release-navigation .year-navigation,
.published-download-navigation .year-navigation { order: -1; }
.published-download-navigation .published-pdf-button { margin-left: 0; }
.published-download-navigation > p { flex-basis: 100%; text-align: right; }

.plan-calendar:not(.plan-calendar--month) thead tr:first-child th {
  vertical-align: top;
}
.plan-calendar:not(.plan-calendar--month) thead tr:first-child th::after {
  margin-top: .45rem;
}

.duty-access { max-width: 25rem; }
.duty-access h2 { font-size: 1.15rem; margin-top: 0; }
.duty-access form { display: grid; gap: .6rem; }

.whiteboard-toolbar { margin-bottom: 1rem; }
.whiteboard-create {
  padding: .65rem 1rem;
  min-height: 2.75rem;
  border: 0;
  border-radius: .5rem;
  background: #b32635;
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.whiteboard-create:hover { background: #8f1d2a; }

.duty-week-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin: .75rem 0 1rem; }
.duty-week-heading h2 { margin: 0; }
.duty-on-call { width: 15rem; max-width: 100%; margin-left: auto; font-size: .85rem; }
.on-call-form { display: grid; gap: .35rem; }
.on-call-form select { padding: .4rem; border: 1px solid var(--border); border-radius: .4rem; background: white; color: var(--ink); font: inherit; }
.on-call-summary { margin-top: .65rem; }
.on-call-summary p { margin: .2rem 0; }
.on-call-form + .on-call-summary > strong { display: none; }
@media (max-width: 650px) { .duty-week-heading { flex-wrap: wrap; } }

.duty-toolbar .duty-copy { order: 0; }
.duty-toolbar .duty-clear { order: 1; }
.duty-toolbar .duty-publish { order: 2; margin-left: auto; }

.duty-on-call .on-call-summary {
  border: 1px solid #b32635;
  border-radius: .5rem;
  padding: .65rem .8rem;
}

.duty-remarks-form, .duty-remarks-text { flex: 1; max-width: 45%; margin: 0 1rem; font-size: .85rem; }
.duty-remarks-form label { display: block; margin-bottom: .3rem; }
.duty-remarks-form textarea { display: block; width: 100%; padding: .5rem; border: 1px solid var(--border); border-radius: .4rem; background: white; font: inherit; resize: vertical; }
.duty-remarks-text p { margin: .3rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#duty-remarks-status { font-size: .75rem; color: #b32635; }
@media (max-width: 800px) { .duty-remarks-form, .duty-remarks-text { max-width: none; flex-basis: 100%; margin: .5rem 0; } }

.duty-published-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; }
.duty-published-toolbar .year-navigation { margin: 0; }
.duty-week-heading .duty-remarks-text { margin-left: 0; border: 1px solid #24652b; border-radius: .5rem; padding: .65rem .8rem; }
.duty-page:has(.duty-published-toolbar) h1 { font-size: clamp(1.5rem, 3vw, 2.4rem); }

.duty-title-dates { font-size: .5em; white-space: nowrap; vertical-align: baseline; }

.duty-week-caption .plan-filters { margin: 0 0 .5rem; }
.duty-week-caption .year-navigation { margin-bottom: 0; }

.on-call-summary .on-call-date { display: block; }

/* Published remarks span the area column, Monday and Tuesday. */
.duty-page:has(.duty-published-toolbar) .duty-week-heading .duty-remarks-text {
  flex: 0 0 auto;
  width: calc((max(100%, 1100px) - 145px) / 3 + 145px);
  max-width: none;
  margin: 0;
}

/* Published summary fields share their top and bottom edges. */
.duty-page:has(.duty-published-toolbar) .duty-week-heading {
  align-items: stretch;
  flex-wrap: nowrap;
}
.duty-page:has(.duty-published-toolbar) .duty-week-heading .duty-on-call {
  display: flex;
  flex: 0 0 15rem;
  margin: 0 0 0 auto;
  text-align: right;
}
.duty-page:has(.duty-published-toolbar) .duty-on-call .on-call-summary {
  width: 100%;
  margin: 0;
}

.duty-planning-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 2rem;
  row-gap: .75rem;
  margin: 0 0 1.5rem;
}
.duty-planning-title h1, .duty-planning-title h2 { margin: 0; }
.duty-planning-title h2 { font-size: 1.15rem; font-weight: 500; }
.duty-planning-title .plan-filters { margin: 0; align-items: center; gap: 1.25rem; }
.duty-planning-title .year-navigation { margin: 0; }

.duty-week-heading .duty-remarks-form { margin-left: 0; }

.duty-online-notice { margin: 0 0 1.25rem; padding: .7rem .9rem; border: 1px solid #b32635; border-radius: .5rem; font-size: .85rem; background: #fff; }
.duty-online-notice p { margin: .3rem 0; }
.duty-online-notice small, .duty-online-detail { color: var(--muted); font-size: .75rem; }
.duty-online-notice a { color: var(--pharmacy-green); }

.duty-on-call-planning { display: flex; align-items: end; flex: 1; min-width: 0; gap: 1rem; }
.duty-on-call-planning .duty-online-notice { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.duty-on-call-planning .duty-on-call { flex: 0 0 15rem; }
@media (max-width: 800px) { .duty-on-call-planning { flex-basis: 100%; } }
@media (max-width: 550px) { .duty-on-call-planning { flex-wrap: wrap; } .duty-on-call-planning .duty-online-notice { flex-basis: 100%; } }

.duty-on-call-planning { align-items: stretch; }
.duty-on-call-planning .duty-on-call {
  display: flex;
  margin-top: 0;
  margin-bottom: 0;
  padding: .7rem .9rem;
  border: 1px solid #b32635;
  border-radius: .5rem;
  background: #fff;
}
.duty-on-call-planning .on-call-form { width: 100%; align-content: start; }

#duty-remarks { min-height: 8.5rem; }
.duty-on-call-planning .duty-online-notice,
.duty-on-call-planning .duty-on-call {
  height: var(--duty-remarks-box-height, 8.5rem);
  overflow-y: auto;
}

.whiteboard-notices-layout { display: grid; grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.notice-overview { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; padding: 1rem; }
.notice-overview h3 { margin: 0 0 .7rem; font-size: 1rem; }
.notice-overview ul { list-style: none; margin: 0; padding: 0; }
.notice-overview li + li { border-top: 1px solid var(--border); }
.notice-overview a { display: block; padding: .65rem 0; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.notice-overview a:hover .notice-overview-subject, .notice-overview a:focus-visible .notice-overview-subject { text-decoration: underline; }
.notice-overview-author { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .2rem; }
.notice-overview-subject { display: block; font-size: .9rem; color: var(--pharmacy-green); }
.whiteboard-notices { min-width: 0; }
.notice { scroll-margin-top: 1rem; }
.notice:target { outline: 2px solid var(--pharmacy-green); outline-offset: 2px; }
@media (max-width: 900px) {
  .whiteboard-notices-layout { grid-template-columns: minmax(0, 1fr); }
  .notice-overview { position: static; max-height: 18rem; }
}

.notice-overview { background: transparent; }

/* Shared typography and spacing across Apo-X modules. */
:root {
  --page-title-size: clamp(1.75rem, 3vw, 2.4rem);
  --section-title-size: 1.25rem;
  --section-space: 1.25rem;
  --control-height: 2.75rem;
}
main .content > h1,
.duty-planning-title h1,
.duty-page:has(.duty-published-toolbar) h1 {
  font-size: var(--page-title-size);
  line-height: 1.15;
  margin-bottom: var(--section-space);
}
.duty-planning-title h1 { margin-bottom: 0; }
.content > h2,
.plan-section > h2,
.published-calendar-toolbar > h2,
.notice-list-header > h2,
.board-form > h2 {
  font-size: var(--section-title-size);
  line-height: 1.3;
}
.vacation-page .vacation-nav,
.duty-page .vacation-nav { gap: .5rem; margin-bottom: var(--section-space); }
.vacation-nav a { min-height: var(--control-height); padding: .6rem .8rem; }
.duty-planning-title { column-gap: 1.5rem; margin-bottom: var(--section-space); }
.plan-toolbar, .duty-toolbar, .duty-published-toolbar, .published-calendar-toolbar { gap: .75rem; }
.duty-published-toolbar { margin-block: var(--section-space); }
.vacation-planner-hints { margin-top: -.75rem; }
.board-form input:not([type="hidden"]):not([type="radio"]),
.board-form select, .board-form button,
.plan-input-button, .published-pdf-button { min-height: var(--control-height); }
.plan-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
main, .content, .plan-fields > div, .board-form form { min-width: 0; }
.plan-fields input, .board-form textarea, #plan-employee, #notice-author, #notice-recipient { min-width: 0; max-width: 100%; }

/* Keep the overview transparent; only the current link is highlighted. */
.notice-overview a { padding-inline: .5rem; }
.notice-overview a[aria-current="location"] {
  background: #e5f3d7;
  border-color: #7d9a6b;
  color: var(--ink);
}
.notice-overview a[aria-current="location"] .notice-overview-subject { font-weight: 700; }
.notice-overview a[aria-current="location"] .notice-overview-author { color: var(--ink); }

@media (max-width: 1000px) {
  .duty-page:has(.duty-planning-title) .duty-week-heading { flex-wrap: wrap; }
  .duty-week-heading .duty-remarks-form { flex-basis: 100%; max-width: none; margin: 0; }
  .duty-on-call-planning { flex-basis: 100%; }
}
@media (max-width: 900px) {
  .duty-page:has(.duty-published-toolbar) .duty-week-heading { flex-wrap: wrap; }
  .duty-page:has(.duty-published-toolbar) .duty-week-heading .duty-remarks-text { width: 100%; }
}
@media (max-width: 640px) {
  .vacation-nav a { flex: 1 1 auto; justify-content: center; }
  .plan-fields { grid-template-columns: minmax(0, 1fr); }
  .board-form input:not([type="radio"]), .board-form select, .board-form textarea { font-size: 1rem; }
  .board-actions { align-items: stretch; gap: .65rem; }
  .board-actions > button, .board-actions > a { min-height: var(--control-height); display: inline-flex; align-items: center; justify-content: center; }
  .plan-toolbar, .published-calendar-toolbar, .duty-published-toolbar { flex-wrap: wrap; align-items: center; }
  .published-calendar-toolbar > h2 { flex-basis: 100%; }
  .plan-release-navigation, .published-download-navigation { flex-basis: 100%; justify-content: flex-start; align-items: center; margin-left: 0; }
  .whiteboard-filter { align-items: stretch; }
  .whiteboard-filter label { flex-basis: 100%; margin-bottom: 0; }
  .whiteboard-filter select { width: 100%; min-height: var(--control-height); font: inherit; }
  .duty-planning-title { align-items: flex-start; }
  .duty-planning-title h2, .duty-planning-title .plan-filters { flex-basis: 100%; }
  .duty-planning-title .plan-filters { gap: .75rem; }
  .duty-toolbar > form { width: 100%; }
  .duty-toolbar > form > button { width: 100%; }
  .duty-copy { flex-wrap: wrap; }
  .duty-copy-source-group { width: 100%; border-right: 1px solid #b32635; border-radius: .5rem .5rem 0 0; }
  .duty-copy-source-group select { flex: 1; min-width: 0; }
  .duty-copy > button { border-radius: 0 0 .5rem .5rem; }
  .duty-legend-published { min-width: 0; width: 100%; }
}
@media (max-width: 550px) {
  .duty-on-call-planning { display: grid; grid-template-columns: minmax(0, 1fr); }
  .duty-on-call-planning .duty-on-call { width: 100%; max-width: none; margin-left: 0; }
}

@media (max-width: 640px) {
  .on-call-form select { font-size: 1rem; min-height: var(--control-height); min-width: 0; max-width: 100%; }
  #duty-remarks { min-height: 9.5rem; }
}

/* Veterinär: paw icon and consistent top-level module navigation. */
.icon.veterinary::before {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: currentColor;
  -webkit-mask: url("paw.svg") center / contain no-repeat;
  mask: url("paw.svg") center / contain no-repeat;
  width: 1.45rem;
  height: 1.45rem;
}
.nav-icon.veterinary::before { width: 1.2rem; height: 1.2rem; }
.documentation-page main { --documentation-page-padding: clamp(1rem, 2vw, 2rem); min-width: 0; padding: var(--documentation-page-padding); }
.documentation-page .content { width: 100%; max-width: none; margin: 0; }
.documentation-page .documentation-nav {
  margin: calc(-1 * var(--documentation-page-padding)) calc(-1 * var(--documentation-page-padding)) var(--section-space);
  padding: 1rem var(--documentation-page-padding);
  width: calc(100% + 2 * var(--documentation-page-padding));
  background: #e8eae6;
  border-bottom: 2px solid #24652b;
  gap: .5rem;
}
.documentation-page .panel h2 { margin: 0 0 .75rem; font-size: var(--section-title-size); line-height: 1.3; }
.documentation-page .panel p:last-child { margin-bottom: 0; }

/* Veterinary receipts: grouped entry form and permanent receipt overview. */
.vet-entry { margin-bottom: 1.5rem; }
.vet-entry .vet-form-note { font-size: .85rem; }
.vet-entry fieldset { min-width: 0; margin: 0 0 .75rem; padding: 1rem; border: 1px solid var(--border); border-radius: .65rem; }
.vet-entry legend { padding: 0 .4rem; font-weight: 700; color: var(--pharmacy-green); }
.vet-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1.25rem; }
.vet-field { min-width: 0; }
.vet-field--wide { grid-column: 1 / -1; }
.vet-field label { display: block; margin-bottom: .3rem; }
.vet-field small { display: block; color: var(--muted); line-height: 1.4; }
.vet-entry .board-actions button { background: #b32635; color: white; }
.vet-entry .board-actions button:hover { background: #8f1d2a; }
.vet-receipt-list > h2 { font-size: var(--section-title-size); }
.vet-receipt-list > h2 span { font-weight: 400; color: var(--muted); }
.vet-receipt + .vet-receipt { margin-top: .8rem; }
.vet-receipt { scroll-margin-top: 1rem; }
.vet-receipt:target { outline: 2px solid var(--pharmacy-green); outline-offset: 2px; }
.vet-receipt-heading { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; justify-content: space-between; }
.vet-receipt-heading h3 { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.vet-receipt-heading span { font-size: .8rem; color: var(--muted); }
.vet-receipt summary { color: var(--pharmacy-green); cursor: pointer; padding: .4rem 0; }
.vet-receipt-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1.25rem; }
.vet-receipt-details dt { color: var(--muted); font-size: .8rem; }
.vet-receipt-details dd { margin: .2rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 800px) { .vet-fields, .vet-receipt-details { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .vet-entry fieldset { padding: .75rem; } }

.vet-entry-toolbar { margin-bottom: var(--section-space); }
