/* The 2006 site's look: maroon masthead, striped wordmark, dark page,
   boxed sections with maroon title bars, Verdana. */
:root {
  --maroon: #8D1919;
  --maroon-dark: #5e0f0f;
  --page: #2b2b2b;
  --box: #f4f1ec;
  --box-edge: #111;
  --ink: #1a1a1a;
  --muted: #D4D0C8;
  --link: #8D1919;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.55 Verdana, Arial, Helvetica, sans-serif;
}

.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px; }

a { color: var(--link); }

/* Masthead */
.masthead {
  background: var(--maroon);
  border-bottom: 2px solid #000;
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}
.masthead h1 { margin: 0; line-height: 0; flex: 1 1 360px; }
.masthead h1 img { max-width: 100%; height: auto; }
.tagline { display: flex; align-items: center; gap: 8px; }
.script {
  margin: 0;
  text-align: right;
  font: italic 900 22px/1.15 "Arial Black", Impact, sans-serif;
  color: #c8102e;
  text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 3px 3px 0 #000;
}
.script span { font-size: 15px; }
.pony { flex: none; }

/* Nav bar, like the old forum header */
.navbar {
  background: var(--maroon-dark);
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  font-size: 12px;
}
.navbar .wrap { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 6px; padding-bottom: 6px; }
.navbar a { color: #fff; text-decoration: none; }
.navbar a:hover { text-decoration: underline; }

/* Boxes */
/* main.wrap, so .wrap's padding shorthand doesn't zero out the top gap */
main.wrap { padding-top: 14px; padding-bottom: 8px; }
.box {
  background: var(--box);
  border: 1px solid var(--box-edge);
  margin-bottom: 14px;
}
.box h2 {
  margin: 0;
  padding: 5px 8px;
  background: var(--maroon);
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .02em;
  border-bottom: 1px solid #000;
}
#welcome h2 { text-transform: none; font-size: 15px; }
.box-body { padding: 10px 12px; }
.box-body p { margin: 0 0 10px; }
.box-body p:last-child { margin-bottom: 0; }

/* Ticket button */
.cta { text-align: center; padding: 8px 0 4px; }
.btn {
  display: inline-block;
  background: var(--maroon);
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  text-decoration: none;
  padding: 12px 28px;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
}
.btn:hover { background: #a82020; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }

/* Fact tables, echoing the old thor_data tables */
.facts { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 6px 8px; border: 1px solid #000; }
.facts th { width: 32%; background: #e6ded2; white-space: nowrap; }
.facts tr:nth-child(even) td { background: #fbf9f6; }

.small { font-size: 12px; color: #555; }
.placeholder { font-style: italic; color: #777; border: 1px dashed #aaa; padding: 10px; text-align: center; }

.footer { color: var(--muted); font-size: 11px; text-align: center; padding-top: 6px; padding-bottom: 24px; }

@media (max-width: 560px) {
  body { font-size: 15px; }
  /* Compact masthead: wordmark + small pony side by side, no script line */
  .masthead-inner { flex-wrap: nowrap; padding-top: 8px; padding-bottom: 8px; }
  .masthead h1 { flex: 1 1 auto; min-width: 0; }
  .script { display: none; }
  .pony { width: 45px; height: auto; }
  .facts th { white-space: normal; width: 38%; }
  .btn { font-size: 16px; padding: 12px 18px; }
}

/* Who's Registered? list */
.tally { font-size: 16px; }
.names { columns: 3 180px; column-gap: 24px; margin: 0 0 12px; padding-left: 28px; }
.names li { break-inside: avoid; padding: 2px 0; }
.names li.new { background: #fff3b0; font-weight: bold; }

.login-note { background: #fbf9f6; border: 1px dashed #aaa; padding: 8px 10px; }
.navbar .login-link { margin-left: auto; font-weight: bold; }

/* Forms (login, request access) */
.form { display: grid; gap: 10px; max-width: 460px; margin-bottom: 10px; }
.form label { display: grid; gap: 4px; font-weight: bold; }
.form input, .form textarea { font: inherit; padding: 7px 8px; border: 1px solid #000; background: #fff; }
.form .hp { position: absolute; left: -9999px; }
.btn-small { font-size: 14px; padding: 7px 16px; justify-self: start; cursor: pointer; }
.form-msg:empty { display: none; }
.form-msg, .notice { background: #eef6e8; border: 1px solid #5a7d3a; padding: 8px 10px; }
.form-msg.bad, .notice.bad { background: #fbe9e9; border-color: var(--maroon); }
.wanted li { margin-bottom: 6px; }
.admin-table td { word-break: break-word; }
.admin-table .btn-small { margin: 2px 4px 2px 0; }

/* Photos */
.optional { font-weight: normal; color: #777; }
.wall-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.filter { display: flex; border: 1px solid #000; }
.filter-btn { font: bold 12px Verdana, Arial, sans-serif; padding: 7px 12px; background: #fff; color: var(--ink); border: 0; cursor: pointer; }
.filter-btn + .filter-btn { border-left: 1px solid #000; }
.filter-btn.on { background: var(--maroon); color: #fff; }
.btn-plain { background: #fff; color: var(--ink); }
.btn-plain:hover { background: #eee; }

/* Justified wall: JS sets each tile's width/height from its aspect ratio */
.wall { display: flex; flex-wrap: wrap; gap: 8px; }
.tile { position: relative; margin: 0; overflow: hidden; background: #ddd; border: 1px solid #000; box-sizing: border-box; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.tile.is-hidden img { opacity: .4; }
.tile-tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.tile-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; margin: 0;
  font-size: 11px; line-height: 1.35; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75));
  opacity: 0; transition: opacity .15s; pointer-events: none;
}
.tile:hover .tile-tools, .tile:hover .tile-cap, .tile:focus-within .tile-tools { opacity: 1; }
@media (hover: none) { .tile-tools, .tile-cap { opacity: 1; } }  /* phones: no hover, always show */
.tool {
  font: bold 11px Verdana, Arial, sans-serif; padding: 4px 7px; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--ink); border: 1px solid #000; box-shadow: 1px 1px 0 #000;
}
.tool:hover { background: #fff; }

/* Viewer / slideshow + edit dialog */
.viewer { position: fixed; inset: 0; background: rgba(0,0,0,.97); display: flex; align-items: center; justify-content: center; z-index: 10; }
.viewer[hidden] { display: none; }
.viewer:not(.dialog) { flex-direction: column; gap: 12px; padding: 50px 64px 16px; }
.viewer > img { max-width: 100%; max-height: calc(100vh - 150px); min-height: 0; border: 2px solid #fff; }
.v-btn { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font: 44px/1 Verdana, sans-serif; padding: 10px 14px; }
.v-close { top: 6px; right: 10px; font-size: 36px; }
.v-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.v-next { right: 4px; top: 50%; transform: translateY(-50%); }
/* Caption + controls sit below the photo, never on top of it */
.v-bottom { flex: none; text-align: center; color: #fff; max-width: 900px; }
.v-text { margin: 0 0 8px; min-height: 1.3em; }
.v-play { font: bold 12px Verdana, sans-serif; padding: 5px 12px; background: #fff; border: 1px solid #000; cursor: pointer; }
.v-count { margin-left: 10px; font-size: 12px; color: #ccc; }
@media (max-width: 560px) { .viewer:not(.dialog) { padding: 48px 8px 12px; } .viewer > img { max-height: calc(100vh - 170px); } .v-prev, .v-next { font-size: 36px; top: auto; bottom: 10px; transform: none; } }
.viewer.single .v-prev, .viewer.single .v-next, .viewer.single .v-play, .viewer.single .v-count { display: none; }
.edit-actions { display: flex; gap: 8px; }
.footer a { color: var(--muted); }

/* Ticket goal progress (home page) */
.goal { max-width: 580px; margin: 14px auto 0; }
.goal-text { margin: 0 0 6px !important; }
.goal-bar { height: 16px; border: 1px solid #000; background: #fff; }
.goal-fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--maroon) 0 6px, #a82020 6px 8px); transition: width .6s; }

/* Breathing room between a CTA button and the small print under it */
.cta + .small { margin-top: 18px; }

/* Phone menu: a 3x2 grid of chunky tiles (the logo links home, so "Home" is hidden) */
@media (max-width: 560px) {
  .navbar .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 16px; }
  .navbar a {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 44px; padding: 4px 6px; font-size: 13px; font-weight: bold; line-height: 1.2;
    background: var(--maroon); border: 1px solid #000; box-shadow: 2px 2px 0 #000;
  }
  .navbar a:hover { text-decoration: none; background: #a82020; }
  .navbar .nav-home { display: none; }
  .navbar .nav-tickets { background: #c8102e; }
  .navbar .login-link { margin-left: 0; }
}

/* Photos page: wider than the rest of the site so the wall gets the room */
.wide-page .wrap { max-width: 1400px; }
.wall-actions { display: flex; gap: 8px; }
.empty-wall { text-align: center; padding: 30px 0; }

/* Retro dialog windows (share, edit): a .box with a close × in the title bar */
.dialog { padding: 16px; background: rgba(0,0,0,.6); }
.dialog-box { width: min(500px, 100%); margin: 0; box-shadow: 6px 6px 0 #000; max-height: calc(100vh - 32px); overflow: auto; }
.dialog-box h2 { display: flex; justify-content: space-between; align-items: center; }
.dialog-x { font: bold 16px/1 Verdana, sans-serif; width: 24px; height: 22px; padding: 0; cursor: pointer;
  background: var(--box); color: var(--ink); border: 1px solid #000; box-shadow: 1px 1px 0 #000; }
.dialog-x:hover { background: #fff; }

/* Drag photos onto the page */
body.dragging::after {
  content: "Drop photos to share them"; position: fixed; inset: 12px; z-index: 20; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  border: 4px dashed #fff; background: rgba(141,25,25,.85); color: #fff; font: bold 24px Verdana, sans-serif;
}

/* Share tools (home + Who's Registered) */
.share-text { background: #fff; border: 1px solid #d9d2c5; padding: 8px 10px; font-style: italic; margin: 0 0 10px !important; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { font-size: 13px; padding: 7px 14px; }
.share-box { margin: 18px 0 14px; padding-top: 14px; border-top: 1px dashed #bbb; }
.share-tools { margin-bottom: 18px; }

/* After the reunion */
.class-photo { margin: 0 0 14px; }
.class-photo img { display: block; width: 100%; height: auto; border: 2px solid #000; }
.class-photo figcaption { font-size: 13px; color: #555; margin-top: 4px; font-style: italic; }
.album-pick { border: 1px solid #c9c1b3; padding: 6px 10px 8px; margin: 0 0 10px; }
.album-pick legend { font-weight: bold; padding: 0 4px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-weight: normal; }
.cta .btn + .btn { margin-left: 8px; }
