body { font: 18px/1.5 system-ui, sans-serif; margin: 40px auto; padding: 0 24px; max-width: 760px; color: #18212d; }
a { color: #315acc; }
.brand { font-weight: 600; text-decoration: none; }
label { display: block; margin-top: 16px; }
input { display: block; box-sizing: border-box; width: 100%; margin-top: 8px; padding: 12px; font: inherit; border: 1px solid #9ca6b4; border-radius: 6px; }
button, .button { display: inline-block; margin-top: 16px; padding: 10px 24px; font: inherit; color: white; background: #315acc; border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; }
.flash { margin: 16px 0; padding: 12px 16px; border-radius: 6px; }
.flash.success { background: #dff3e4; }
.flash.error { background: #fbe1e1; }
#menu { display: flex; gap: 16px; margin-top: 8px; }
#menu[hidden] { display: none; }
.figure { display: inline-block; margin: 16px 16px 0 0; vertical-align: top; width: 140px; }
.cover { height: 180px; display: grid; place-items: center; font-size: 36px; color: white; background: #6b4f3a; border-radius: 4px 10px 10px 4px; }
.figcaption { display: none; }
.figure:hover .figcaption { display: block; }
.figcaption h5 { margin: 8px 0 0; font-size: 16px; }
.figcaption p { margin: 0; font-size: 14px; color: #5c6675; }
#shelves { display: flex; gap: 24px; }
.shelf { flex: 1; min-height: 180px; padding: 12px; background: #f1ece4; border: 2px solid #b9a88f; border-radius: 8px; }
.shelf header { font-weight: 600; margin-bottom: 8px; }
.book { margin-top: 8px; padding: 8px 12px; background: white; border: 1px solid #b9a88f; border-radius: 4px; cursor: move; user-select: none; }
iframe { width: 100%; height: 200px; border: 1px solid #9ca6b4; border-radius: 6px; }
#departures { width: 100%; border-collapse: collapse; }
#departures th, #departures td { padding: 8px; text-align: left; border-bottom: 1px solid #d5dbe3; }
/* На узком экране строки табло складываются в карточки. */
@media (max-width: 600px) {
  #departures thead { display: none; }
  #departures tr { display: block; margin-bottom: 12px; padding: 8px; border: 1px solid #d5dbe3; border-radius: 8px; }
  #departures td { display: block; border: 0; padding: 2px 0; }
}
/* Шапка Departures: на широком экране ссылки в ряд, на узком за кнопкой. */
header { display: flex; align-items: center; gap: 16px; margin: 16px 0; }
header ul { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }
#nav-toggle { display: none; margin: 0; }
aside { margin-top: 24px; padding: 12px 16px; background: #f1f4f9; border-radius: 8px; }
@media (max-width: 600px) {
  #nav-toggle { display: inline-block; }
  #nav-links { display: none; }
  #nav-links.open { display: flex; flex-direction: column; }
  aside { display: none; }
}
select { display: block; box-sizing: border-box; width: 100%; margin-top: 8px; padding: 12px; font: inherit; }
fieldset { margin-top: 16px; border: 1px solid #9ca6b4; border-radius: 6px; }
.label { display: block; margin-top: 16px; }
label.choice { display: flex; align-items: center; gap: 8px; }
label.choice input { display: inline; width: auto; margin: 0; }
.dropdown [role="listbox"] { margin: 4px 0 0; padding: 0; list-style: none; border: 1px solid #9ca6b4; border-radius: 6px; }
.dropdown [role="option"] { padding: 8px 12px; cursor: pointer; }
.dropdown [role="option"]:hover { background: #eef2fb; }
.error { color: rgb(200, 30, 30); }
#items li { display: flex; align-items: center; gap: 12px; }
#items input { display: inline; width: auto; margin: 0; }
#items button { margin: 0; padding: 4px 12px; }
#items .packed label { text-decoration: line-through; }
.extra { margin-top: 12px; }
#passengers { width: 100%; border-collapse: collapse; }
#passengers td, #passengers th { padding: 8px; text-align: left; border-bottom: 1px solid #d5dbe3; }
#cabin { max-height: 240px; overflow-y: auto; border: 1px solid #9ca6b4; border-radius: 6px; padding: 8px; }
.cabin-row { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.row-label { width: 56px; }
.seat { padding: 4px 6px; min-width: 40px; }
.seat[aria-pressed="true"] { background: #2b5cad; color: #fff; }
#cabin.compact .seat { padding: 0 2px; min-width: 32px; }
.passenger { display: inline-block; padding: 4px 10px; margin-right: 8px; border: 1px solid #9ca6b4; border-radius: 12px; cursor: grab; user-select: none; }
#passengers { padding: 0; list-style: none; }
.view-menu { display: inline-block; position: relative; }
[role="menu"] { margin: 4px 0 0; padding: 0; list-style: none; border: 1px solid #9ca6b4; border-radius: 6px; background: #fff; }
[role="menuitem"] { padding: 8px 12px; cursor: pointer; }
