/* URochester-inspired student project theme. Core palette and typography follow
   the University's public brand center; layout is original to this game. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #001e5f;
  --ink: #001e5f;
  --gold: #ffd82b;
  --paper: #fff;
  --line: #d8dbe1;
  --muted: #414141;
  --interactive: #021bc3;
}

* { box-sizing: border-box; }
body { background: #fff; color: var(--blue); font: 16px/1.5 Inter, Aptos, Arial, sans-serif; }

/* A restrained, editorial masthead instead of app-style navigation. */
.top {
  min-height: 112px;
  height: auto;
  padding: 18px max(5vw, 24px);
  background: #fff;
  border-bottom: 1px solid #dedede;
  position: relative;
}
.top::after { content: ""; height: 5px; position: absolute; left: 0; right: 0; bottom: -5px; background: var(--gold); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--blue); font-weight: 600; }
.school-home { display: inline-flex; align-items: center; }
.school-home:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.wordmark {
  width: 43px; height: 50px; display: grid; place-items: center;
  border: 1.5px solid var(--blue); color: var(--blue);
  font: 700 15px Georgia, "Times New Roman", serif;
  clip-path: polygon(0 0,100% 0,100% 73%,50% 100%,0 73%);
}
.wordmark[viewBox] { display: block; flex: 0 0 auto; width: 43px; height: 50px; border: 0; clip-path: none; color: var(--blue); overflow: visible; }
.ur-logo { display: block; width: min(285px, 32vw); height: auto; max-height: 66px; object-fit: contain; }
.school-name { font: 21px/.9 Georgia, "Times New Roman", serif; letter-spacing: -.55px; }
.brand-divider { width: 1px; height: 43px; margin: 0 10px; background: #b8bdc6; }
.brand strong { font-size: 16px; font-weight: 700; }
.topright { gap: 23px; color: var(--blue); font-size: 14px; }
.edition { color: var(--blue); background: #fff; border: 0; border-bottom: 2px solid var(--gold); border-radius: 0; padding: 8px 0; font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.score { color: var(--blue); font-weight: 600; }
.score b { color: var(--blue); font: 700 18px Georgia, serif; }
.admin { color: var(--interactive); font-size: 21px; border: 1px solid var(--blue); width: 39px; height: 39px; display: grid; place-items: center; }
.admin[hidden] { display: none; }

/* Broad campaign-like title panel, with the dandelion block echoing UR site art. */
.wrap { max-width: 1480px; padding: 48px 32px 56px; }
.intro {
  min-height: 228px; align-items: center; margin: 0 0 30px; padding: 33px 42px;
  background: linear-gradient(108deg, #f2f2f2 0 75%, var(--gold) 75% 100%);
  border-bottom: 4px solid var(--blue); position: relative;
}
.eyebrow { color: var(--blue); font: 700 12px/1.3 Inter, Aptos, Arial, sans-serif; letter-spacing: .14em; margin-bottom: 12px; }
.intro h1 { color: var(--blue); max-width: 800px; font: 700 clamp(42px,5vw,62px)/.99 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.intro p { max-width: 590px; color: #30343b; font-size: 17px; margin-top: 14px; }
.round { color: var(--blue); background: var(--gold); padding: 12px 14px; font: 700 12px/1.4 Inter, Aptos, Arial, sans-serif; letter-spacing: .07em; }
.round b { color: var(--blue); }

/* Square editorial panels, blue rules, and photo-forward proportions. */
.layout { grid-template-columns: minmax(0,1.08fr) minmax(390px,.92fr); gap: 26px; }
.card { background: #f2f2f2; border: 0; border-radius: 0; box-shadow: none; overflow: hidden; }
.photo-card, .map-card { min-height: 620px; border-bottom: 4px solid var(--interactive); }
.photo { min-height: 455px; background: #e7e7e7; }
.photo img { object-fit: contain; object-position: center; }
.placeholder { color: var(--blue); }
.placeholder i { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 20px; background: var(--gold); color: var(--blue); border-radius: 50%; }
.placeholder b { display: block; font: 700 25px/1.15 Georgia, "Times New Roman", serif; }
.placeholder span, .caption small { color: #414141; }
.photo-unavailable { max-width: 420px; margin: 30px; padding: 24px; background: #fff; color: var(--blue); text-align: center; border-left: 5px solid var(--gold); }
.photo-unavailable b { display: block; font: 700 21px Georgia, "Times New Roman", serif; }
.photo-unavailable span { display: block; margin-top: 8px; color: #414141; font-size: 13px; }
.hidden-loc { top: 18px; left: 18px; padding: 10px 13px; border-radius: 0; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.caption { min-height: 92px; padding: 18px 22px; background: #f2f2f2; }
.caption b { font: 700 21px/1.2 Georgia, "Times New Roman", serif; color: var(--blue); }
.caption small { font-size: 13px; }
.badge { background: var(--gold); color: var(--blue); border-radius: 0; padding: 10px 12px; font-weight: 800; }
.maphead { min-height: 86px; padding: 18px 22px; background: #f2f2f2; border-bottom: 1px solid #d2d2d2; }
.maphead b { color: var(--blue); font: 700 21px/1.15 Georgia, "Times New Roman", serif; }
.maphead small { color: #414141; font-size: 13px; }
.maphead .osm { color: #414141; font-size: 10px; letter-spacing: .08em; }
.map-toggle { display: inline-flex; flex-shrink: 0; border: 1px solid var(--blue); background: #fff; }
.map-toggle button { min-height: 34px; padding: 7px 11px; border: 0; border-radius: 0; background: #fff; color: var(--blue); font: 700 11px Inter, Aptos, Arial, sans-serif; cursor: pointer; }
.map-toggle button + button { border-left: 1px solid var(--blue); }
.map-toggle button.selected { background: var(--blue); color: #fff; }
.map-toggle button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
#map { min-height: 455px; filter: saturate(.78); }
.controls { min-height: 68px; align-items: center; padding: 12px 18px; background: #f2f2f2; border-top: 1px solid #d2d2d2; }
.button { min-height: 44px; border: 0; border-radius: 0; font: 700 14px Inter, Aptos, Arial, sans-serif; }
.clear { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.submit, .primary { background: var(--interactive); color: #fff; }
.submit::after { content: "→"; font-size: 18px; margin-left: 10px; }
.submit:hover:not(:disabled), .primary:hover { background: var(--blue); }
.submit:disabled { background: #848da4; color: white; }
.note { padding: 0 22px 15px; background: #f2f2f2; color: #414141; font-size: 12px; }
.result { margin-top: 22px; padding: 22px 25px; background: var(--gold); border: 0; border-radius: 0; color: var(--blue); }
.result b { font: 700 22px Georgia, "Times New Roman", serif; }
.result small { color: var(--blue); font-size: 14px; }
.points { color: var(--blue); font: 700 26px Georgia, "Times New Roman", serif; }
.result-actions { display: flex; align-items: center; gap: 18px; }
.round-complete { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: 22px; background: rgb(0 32 91 / 86%); }
.round-complete[hidden] { display: none; }
.scorecard { width: min(690px, 100%); max-height: min(88vh, 900px); overflow: auto; padding: clamp(24px,5vw,48px); background: white; border-bottom: 8px solid var(--gold); box-shadow: 0 18px 70px #0006; }
.scorecard h2 { margin: 0; color: var(--blue); font: 700 clamp(30px,5vw,46px)/1.05 Georgia, "Times New Roman", serif; }
.final-score { margin: 14px 0 22px; color: var(--blue); font: 700 clamp(40px,8vw,72px)/1 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.round-breakdown { border-top: 1px solid var(--line); }
.summary-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--blue); font-size: 14px; }
.summary-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.summary-row b { text-align: right; white-space: nowrap; }
.score-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.foot { border-top: 1px solid #d8dbe1; padding-top: 18px; margin-top: 30px; color: #414141; font-size: 12px; }
.foot b { color: var(--blue); }
.leaflet-container { font: 12px Inter, Aptos, Arial, sans-serif; }
.leaflet-control-attribution { font-size: 9px !important; }

/* Matching photo-manager pages. */
.panel { background: #f2f2f2; border: 0; border-bottom: 2px solid var(--interactive); border-radius: 0; box-shadow: none; padding: 24px; }
.panel h2 { color: var(--blue); font: 700 25px/1.15 Georgia, "Times New Roman", serif; }
.head { margin: 14px 0 28px; padding: 28px 32px; min-height: 160px; background: linear-gradient(105deg,#f2f2f2 0 80%,var(--gold) 80%); border-bottom: 4px solid var(--blue); }
.head h1 { color: var(--blue); font: 700 clamp(36px,4vw,50px)/1 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.head p, .hint { color: #414141; }
.field label { color: var(--blue); font-size: 13px; }
.field input[type=text], .field input[type=number] { border: 1px solid #9ca5b2; border-radius: 0; background: #fff; }
.preview { border-radius: 0; border-bottom: 3px solid var(--gold); }
.map { border-radius: 0; border-color: #9ca5b2; }
.btn { min-height: 42px; border-radius: 0; font: 700 13px Inter, Aptos, Arial, sans-serif; }
.secondary { color: var(--blue); background: #fff; border: 1px solid var(--blue); }
.danger { border: 0; }
.item { border-color: #d2d2d2; }
.photo-history { color: var(--blue) !important; font: 600 12px/1.5 Inter, Aptos, Arial, sans-serif !important; }
.games-played { margin: 0 0 12px; padding: 12px 14px; border-left: 5px solid var(--gold); background: #fff; color: var(--blue); font-weight: 700; }
.admin-photo-item { grid-template-columns: 88px minmax(0,1fr) auto; align-items: center; gap: 14px; }
.photo-thumb-wrap { position: relative; width: 80px; height: 66px; background: #e6e6e6; }
.admin-photo-item .thumb { width: 80px; height: 66px; object-fit: contain; }
.admin-photo-data { min-width: 0; }
.photo-row-actions { display: flex; flex-direction: column; gap: 7px; }
.photo-row-actions .btn { min-height: 36px; padding: 8px 10px; white-space: nowrap; }
.photo-difficulty { color: var(--blue) !important; font-weight: 700; }
.admin-login-wrap { max-width: 820px; }
.admin-login-head { min-height: 190px; }
.admin-login-card { max-width: 560px; margin: -2px 0 0 auto; }
.admin-login-card h2 { margin-bottom: 18px; }
.admin-login-card label { display: block; margin-bottom: 8px; color: var(--blue); font-weight: 700; }
.admin-login-card input[type=password] { width: 100%; min-height: 48px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid #9ca5b2; background: #fff; color: var(--ink); font: inherit; }
.admin-login-card .btn { min-width: 140px; }
.login-message { min-height: 1.5em; margin: 12px 0 0; color: var(--blue); font-size: 13px; }
.difficulty-rank { display: grid; place-items: center; width: 44px; height: 44px; background: var(--gold); color: var(--blue); font: 700 15px Georgia, "Times New Roman", serif; }
.photo-thumb-wrap .difficulty-rank { position: absolute; left: 0; bottom: 0; width: auto; min-width: 36px; height: 23px; padding: 0 5px; font: 700 11px Inter, Aptos, Arial, sans-serif; }
.photo-thumb-wrap .thumb { cursor: zoom-in; }
.photo-lightbox[hidden] { display: none; }
.photo-lightbox { position: fixed; inset: 0; z-index: 20000; display: grid; place-items: center; padding: 28px; background: rgb(0 20 60 / 92%); }
.lightbox-figure { display: grid; grid-template-rows: minmax(0,1fr) auto; width: min(1100px,100%); height: min(88vh,900px); margin: 0; padding: 16px; background: #fff; border-bottom: 6px solid var(--gold); }
.lightbox-figure img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #e6e6e6; }
.lightbox-figure figcaption { padding: 10px 4px 2px; color: var(--blue); font: 700 18px Georgia, "Times New Roman", serif; }
.lightbox-close { position: absolute; top: 18px; right: 22px; width: 46px; height: 46px; border: 1px solid var(--blue); background: var(--gold); color: var(--blue); font: 32px/1 Arial, sans-serif; cursor: pointer; }
.lightbox-close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.difficulty-score { color: var(--blue); font: 700 18px Georgia, "Times New Roman", serif; }
.community-standing { margin: 12px 0 0; padding: 12px 14px; background: #f2f2f2; border-left: 4px solid var(--gold); color: var(--blue); font-size: 13px; }
.thumb { border-radius: 0; border-bottom: 2px solid var(--gold); }
.notice { background: #fff3b1; color: var(--blue); border-left: 5px solid var(--gold); border-radius: 0; }
.back { color: var(--interactive); font-weight: 700; }

@media (max-width: 850px) {
  html, body { width: 100%; max-width: 100%; overflow-x: clip; }
  .top, .wrap { width: 100%; max-width: 100%; min-width: 0; }
  .layout { grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; gap: 18px; }
  .layout > .photo-card, .layout > .map-card { width: 100%; min-width: 0; }
  .top { min-height: 88px; padding-inline: 20px; }
  .wrap { padding: 34px 20px 42px; }
  .intro { min-height: 205px; padding: 28px; background: linear-gradient(108deg,#f2f2f2 0 82%,var(--gold) 82%); }
  .photo-card, .map-card { min-height: 540px; }
  .photo {
    flex: 0 0 auto;
    height: clamp(300px, 75vw, 520px);
    min-height: 0;
    background: #e7e7e7;
  }
  .photo img { object-fit: contain; object-position: center; }
  .photo-unavailable { width: calc(100% - 28px); margin: 14px; padding: 20px 16px; }
  #map { width: 100%; min-width: 0; min-height: 390px; }
}
@media (max-width: 620px) {
  .top { min-height: 76px; padding: 10px 14px; }
  .wordmark { width: 34px; height: 40px; font-size: 12px; }
  .ur-logo { width: min(150px, 38vw); max-height: 42px; }
  .school-name { font-size: 15px; }
  .brand { gap: 7px; }
  .brand-divider { height: 32px; margin: 0 4px; }
  .brand strong { max-width: 80px; font-size: 11px; line-height: 1.1; }
  .result-actions { flex-direction: column; align-items: flex-end; gap: 8px; }
  .score-actions { display: grid; }
  .topright { gap: 10px; font-size: 12px; }
  .edition { display: none; }
  .admin { width: 34px; height: 34px; }
  .wrap { padding: 26px 13px 34px; }
  .intro { display: block; min-height: 0; padding: 26px 20px 70px; margin-bottom: 18px; background: linear-gradient(155deg,#f2f2f2 0 79%,var(--gold) 79%); }
  .intro h1 { font-size: 39px; }
  .intro p { font-size: 15px; }
  .round { position: absolute; right: 16px; bottom: 14px; padding: 7px 9px; }
  .layout { gap: 16px; }
  .photo-card, .map-card { min-height: 0; }
  .photo { height: clamp(250px, 78vw, 420px); }
  #map { min-height: clamp(320px, 92vw, 420px); }
  .caption { min-height: 78px; padding: 14px; }
  .caption b, .maphead b { font-size: 18px; }
  .maphead { min-height: 73px; padding: 13px 15px; gap: 10px; flex-wrap: wrap; }
  .maphead > div:first-child { flex: 1 1 160px; min-width: 0; }
  .map-toggle { margin-left: auto; }
  .map-toggle button { padding: 7px 8px; font-size: 10px; }
  .controls { padding: 10px; }
  .button { min-height: 42px; padding: 10px 12px; }
  .note { padding: 0 13px 13px; }
  .foot { gap: 12px; font-size: 10px; }
  .head { padding: 23px 19px; min-height: 0; background: linear-gradient(155deg,#f2f2f2 0 84%,var(--gold) 84%); }
  .head h1 { font-size: 34px; }
  .panel { padding: 16px; }
  .admin-login-card { margin: 0; }
  .admin-photo-item { grid-template-columns: 72px minmax(0,1fr); gap: 10px; }
  .photo-thumb-wrap, .admin-photo-item .thumb { width: 66px; height: 60px; }
  .photo-row-actions { grid-column: 2; flex-direction: row; flex-wrap: wrap; }
  .photo-lightbox { padding: 12px; }
  .lightbox-figure { height: min(84vh,760px); padding: 9px; }
  .lightbox-close { top: 8px; right: 8px; }
}

@media (max-width: 480px) {
  .top { align-items: center; gap: 8px; padding-inline: 11px; }
  .brand { min-width: 0; gap: 6px; }
  .ur-logo { width: min(125px, 34vw); }
  .brand-divider { margin-inline: 2px; }
  .brand strong { max-width: 72px; font-size: 10px; }
  .topright { gap: 5px; font-size: 10px; }
  .score { white-space: nowrap; }
  .score b { font-size: 14px; }
  .wrap { padding-inline: 11px; }
  .intro { padding-inline: 17px; }
  .intro h1 { font-size: clamp(32px, 9vw, 39px); }
  .foot { flex-wrap: wrap; }
}

.weekly-entry { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.weekly-entry > label { display:block; font-weight:700; margin-bottom:8px; }
.weekly-entry-row { display:flex; gap:9px; }
.weekly-entry-row input { flex:1; min-width:0; padding:12px; border:1px solid var(--line); font:inherit; }
.weekly-entry-row button { flex:0 0 auto; }
.weekly-message { min-height:1.4em; color:var(--blue); font-weight:600; }
.weekly-board, .weekly-lobby { margin-top:18px; }
.weekly-board h3, .weekly-lobby h2 { color:var(--blue); font-family:Georgia,serif; }
.weekly-board-row { display:grid; grid-template-columns:34px minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:10px 6px; border-top:1px solid var(--line); }
.weekly-board-row > b { color:var(--blue); }
.weekly-board-row strong { color:var(--blue); font-family:'DM Mono',monospace; }
.weekly-board-row small { color:var(--muted); }
.weekly-photo-choice { display:flex; align-items:center; gap:6px; margin:0 0 7px; font-size:11px; font-weight:700; color:var(--blue); }
.weekly-photo-choice input { accent-color:var(--blue); }
@media(max-width:620px) { .weekly-entry-row { flex-direction:column; } .weekly-board-row { grid-template-columns:28px minmax(0,1fr) auto; gap:7px; } .weekly-board-row small { grid-column:2 / 4; } }

@media(max-width:620px) { .weekly-link, .back-game-link { display:inline-flex!important; align-items:center; padding:5px 7px; font-size:9px; white-space:nowrap; } }
@media(max-width:480px) { .top { flex-wrap:wrap; height:auto; min-height:76px; padding-block:8px; } .topright { flex:1 0 100%; justify-content:flex-end; } }
