/* base.css — V1 appearance. See DESIGN-HANDOVER.md. */


/* Foundations */

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:var(--text-size)/var(--text-leading) var(--font-body);
}

a {
  color:var(--accent);
}

header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:24px max(5vw,16px);
  border-bottom:1px solid #46506c;
  flex-wrap:wrap;
}

.brand {
  font-weight:900;
  font-size:26px;
  text-decoration:none;
  letter-spacing:2px;
}

.brand small {
  display:block;
  font-size:10px;
  letter-spacing:4px;
  color:var(--subtle);
}

nav {
  display:flex;
  align-items:center;
  gap:22px;
  flex-wrap:wrap;
}

nav form {
  margin:0;
}

main {
  max-width:1160px;
  margin:auto;
  padding:40px 24px 80px;
}

h1 {
  font-size:var(--heading-size);
  line-height:var(--heading-leading);
  margin:10px 0 24px;
}

h2 {
  font-size:var(--heading-small-size);
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline:3px solid #fff;
  outline-offset:4px;
}

footer {
  color:var(--subtle);
}

footer {
  padding:24px;
  text-align:center;
  border-top:1px solid var(--border-color);
}

.skip {
  position:absolute;
  left:-10000px;
}

.skip:focus {
  left:10px;
  top:10px;
  background:#111;
  padding:10px;
}

summary {
  cursor:pointer;
}

dd {
  margin-bottom:12px;
  overflow-wrap:anywhere;
}

form p {
  overflow-wrap:anywhere;
}

img {
  max-width:100%;
}

@media(max-width:600px) {
header {
  padding:20px;
}


nav {
  gap:12px;
  font-size:14px;
}


main {
  padding:28px 16px;
}
}


/* Navigation and game views */

body:where(:not(.day-stage)) {
  padding-bottom:calc(108px + env(safe-area-inset-bottom));
}

.bottom-nav {
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  z-index:50;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:4px;
  background:#171d31;
  border-top:1px solid #66728f;
  padding:10px max(10px,calc((100vw - 840px)/2)) calc(10px + env(safe-area-inset-bottom));
  box-shadow:0 -8px 24px #0004;
}

.bottom-nav a {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  min-height:60px;
  color:var(--subtle);
  text-decoration:none;
  font-size:12px;
  white-space:nowrap;
}

.bottom-nav a>span:first-child {
  font-size:26px;
  line-height:30px;
}

.bottom-nav img {
  image-rendering:pixelated;
}

.bottom-nav a[aria-current=page] {
  color:var(--accent);
  font-weight:800;
}

.bottom-nav .scan-nav {
  background:var(--accent);
  color:#132208;
  border-radius:50%;
  width:78px;
  height:78px;
  justify-self:center;
  align-self:center;
  margin-top:-28px;
  box-shadow:0 0 0 7px #171d31;
  font-size:14px;
  font-weight:900;
}

.bottom-nav .scan-nav[aria-current=page] {
  color:#132208;
  outline:2px solid white;
}

.qr-image {
  display:block;
  max-width:min(100%,460px);
  height:auto;
  margin:24px auto;
  background:white;
  padding:16px;
}

.scan-video {
  width:100%;
  max-height:50vh;
  object-fit:cover;
  border-radius:12px;
}

.scan-tools {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.scan-status {
  min-height:2em;
}

.scan-manual input {
  width:100%;
}

[hidden] {
  display:none!important;
}

@media(max-width:600px) {
.bottom-nav a {
  font-size:10px;
}


.bottom-nav .scan-nav {
  width:70px;
  height:70px;
}
}


/* Public event presentation */

.flash {
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:20px 24px;
  margin:0 0 24px;
  border:2px solid #8896b0;
  border-radius:12px;
  background:#242d45;
  font-weight:650;
  overflow-wrap:anywhere;
}

.flash-icon {
  font-size:25px;
  line-height:1.2;
}

.flash.success {
  border-color:#a7f36b;
  background:#203529;
}

.flash.success .flash-icon {
  color:#a7f36b;
}

.flash.error {
  border-color:#ff8c8c;
  background:#40272e;
  color:#fff;
}

.flash.warning {
  border-color:#ffc877;
  background:#393025;
}

.flash p {
  margin:0;
}

.flash small {
  display:block;
  font-weight:400;
  margin-top:5px;
}

@media(max-width:650px) {
.flash {
  padding:16px;
}
}


/* Museum and visitor orientation */

body:has(.intro-scan) .scan-nav {
  outline:3px solid #fff;
  outline-offset:5px;
}

header .header-actions {
  gap:12px;
  min-width:0;
}

header .header-actions>.button {
  font-size:1rem;
  line-height:1.4;
  min-height:44px;
  text-align:center;
  text-decoration:none;
  white-space:nowrap;
}

header .header-secondary {
  background:transparent;
  color:var(--accent);
  border:1px solid #7aa65b;
  padding:9px 16px;
}

header .header-primary {
  padding:10px 16px;
}

@media(max-width:600px) {
header .header-actions {
  width:100%;
  column-gap:12px;
  row-gap:12px;
}


header .header-actions>.button {
  font-size:.9375rem;
}


header .header-actions>form {
  margin-left:auto;
}
}

header .brand {
  display:block;
  flex-shrink:0;
  line-height:1;
}

header .brand-logo {
  display:block;
  width:160px;
  height:auto;
  max-width:100%;
  object-fit:contain;
}

.brand-name {
  white-space:nowrap;
}

@media(max-width:600px) {
header .brand-logo {
  width:150px;
}
}

header .brand {
  display:flex;
  align-items:center;
  min-height:56px;
}

@media(max-width:600px) {
header .brand {
  min-height:52.5px;
}
}


/* Accepted compact layouts */

#scan-status:empty {
  min-height:0;
  margin:8px 0;
}

.scan-manual button {
  margin-top:16px;
}

.scan-manual label {
  display:block;
  margin-bottom:8px;
}

html {
  scroll-padding-bottom:calc(128px + env(safe-area-inset-bottom));
}
