* { box-sizing: border-box; }
html { overflow-y: scroll; scrollbar-gutter: stable; }
body { margin: 0; background: #ececec url("gfx/bg.gif"); color: #222; font: 15px/1.55 Verdana, Arial, sans-serif; }
.site { width: min(900px, 100% - 24px); margin: 24px auto; background: #f7f7f7; border: 1px solid #bbb; box-shadow: 0 2px 14px #0002; }
/* The original banner has a 20px empty strip above its 800x120 artwork. */
header { position: relative; aspect-ratio: 800 / 120; overflow: hidden; padding: 0; background: transparent; }
header img { position: absolute; bottom: 0; display: block; width: 100%; height: auto; }
.notice { margin: 8px 0 0; color: #555; font-size: 12px; }
nav { display: flex; flex-wrap: wrap; gap: 0; padding: 0 18px; background: #ddd; border-block: 1px solid #bbb; }
nav a { padding: 12px 10px; color: #222; font-weight: bold; text-decoration: none; }
nav a[aria-current="page"], nav a:hover { background: #f7f7f7; text-decoration: underline; }
/* Reserve the submenu row even on pages without submenu links. */
.subnav { min-height: 49.25px; align-content: start; }
main { min-height: 300px; padding: 22px; overflow-wrap: break-word; overflow-x: auto; }
h1 { margin: 0 0 18px; font-size: 22px; }
article { padding: 0 0 18px; margin: 0 0 20px; border-bottom: 1px solid #bbb; }
article h2 { margin: 0 0 4px; font-size: 17px; }
article time { color: #666; font-size: 12px; }
article p { white-space: normal; }
.legacy-content { width: 100%; border-collapse: collapse; }
.legacy-content td { font: inherit; vertical-align: top; }
.legacy-content img { max-width: 100%; height: auto; }
footer { padding: 14px 22px; border-top: 1px solid #bbb; color: #666; font-size: 12px; }
.account label { display: block; margin: 12px 0; font-weight: bold; }
.account input { display: block; width: min(360px, 100%); padding: 8px; margin-top: 4px; }
.account button { padding: 9px 14px; margin: 8px 8px 8px 0; cursor: pointer; }
.account-error { padding: 10px; background: #ffe4e4; border: 1px solid #bb5555; }
.account-message { padding: 10px; background: #e7f4e7; border: 1px solid #78a978; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .site { width: 100%; margin: 0; border: 0; } main { padding: 14px; } nav { padding: 0 6px; } nav a { padding: 10px 8px; } }

@media (max-width: 760px) {
  .subnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(49.25px, auto); min-height: 100.5px; }
}
@media (max-width: 560px) {
  .subnav { grid-auto-rows: minmax(43.25px, auto); min-height: 88.5px; }
}

.account-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 22px; }
.account-panel { min-width: 0; padding: 18px; border: 1px solid #bbb; background: #fff; scroll-margin-top: 16px; }
.account-panel h2 { margin: 0 0 14px; font-size: 18px; }
.account-help { color: #555; font-size: 13px; }
.account-logout { margin-top: 18px; }
@media (max-width: 760px) { .account-panels { grid-template-columns: 1fr; } }

.lan-history-links { padding-left: 22px; }
.lan-history-links a[aria-current="page"] { font-weight: bold; }
.lan-event { scroll-margin-top: 16px; }
.lan-details { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 18px; }
.lan-details th, .lan-details td { padding: 9px 12px; border-bottom: 1px solid #ccc; text-align: left; vertical-align: top; }
.lan-details th { width: 110px; white-space: nowrap; }
.lan-details tr:nth-child(odd) { background: #e6e6e6; }
.lan-photos { margin-top: 24px; }
.lan-photos h3 { margin: 0 0 14px; font-size: 17px; }
.lan-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 14px; align-items: start; }
.lan-gallery img { display: block; width: 100%; max-width: 120px; height: auto; border: 1px solid #bbb; }
@media (max-width: 560px) { .lan-details th { width: 100px; } .lan-details th, .lan-details td { padding: 8px; } }

/* Native controls, sized consistently with the existing retro account forms. */
main input, main textarea, main select, main button { font: inherit; max-width: 100%; }
.site-form { max-width: 640px; margin-bottom: 24px; }
.site-form label { display: block; margin: 12px 0; font-weight: bold; }
.site-form input:not([type="hidden"]), .site-form textarea { display: block; margin-top: 4px; padding: 8px; }
.site-form input:not([type="hidden"]) { width: min(360px, 100%); }
.site-form textarea { width: 100%; min-height: 150px; resize: vertical; }
.site-form button { padding: 9px 14px; margin: 8px 8px 8px 0; cursor: pointer; }
.site-form label input, .site-form label textarea, .account label input { font-weight: normal; }
.lan-details td { white-space: normal; overflow-wrap: break-word; word-break: normal; }
.lan-photo { display: block; width: fit-content; max-width: 100%; }
.lan-photo:focus-visible, main button:focus-visible, main input:focus-visible, main textarea:focus-visible, main select:focus-visible { outline: 2px solid #444; outline-offset: 2px; }
.photo-dialog { max-width: min(440px, calc(100% - 24px)); padding: 16px; border: 1px solid #888; background: #f7f7f7; color: #222; font: inherit; }
.photo-dialog::backdrop { background: #0009; }
.photo-dialog button { display: block; margin: 0 0 12px auto; padding: 6px 12px; font: inherit; cursor: pointer; }
.photo-dialog img { display: block; width: 360px; max-width: 100%; height: auto; margin: auto; }

@media (max-width: 760px) {
  .legacy-content, .legacy-content table { width: 100%; max-width: 100%; table-layout: fixed; }
  .legacy-content td[width="648"], .legacy-content td[width="555"] { width: auto; }
  .legacy-content td { overflow-wrap: anywhere; }
  .legacy-content td:has(> img[src^="gfx/staff/"]) { width: 94px; }
  .legacy-content img[src^="gfx/staff/"] { width: 80px; max-width: 80px; }
  .legacy-content select { min-width: 0; max-width: 100%; }
}

@media (max-width: 760px) {
  .legacy-content td[width="646"] { width: auto; }
  .legacy-content img[src="gfx/main_line.gif"] { width: 100%; }
  .legacy-content table:has(> tbody > tr > td > img[src^="gfx/staff/"]),
  .legacy-content td[width="555"] > table { table-layout: auto; }
  .legacy-ovrigt_uthyrning td[width="150"] { width: 25%; }
  .legacy-ovrigt_uthyrning td[width="400"] { width: 55%; }
  .legacy-ovrigt_uthyrning td[width="78"] { width: 20%; }
}
@media (max-width: 760px) {
  .legacy-content td[width="555"] .head_small { font-size: 12px; white-space: nowrap; }
}
