:root {
  --orange: #ee7424;
  --navy: #232d60;
  --paper: #efeee9;
  --ink: #111318;
  --muted: #62656d;
  --line: #d8d4ca;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(160deg, rgba(238, 116, 36, 0.1), transparent 30rem),
    var(--paper);
}

a,
button {
  border-radius: 8px;
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.pageHeader {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 32px clamp(18px, 4vw, 56px) 22px;
  color: var(--white);
  background: var(--orange);
  border-bottom: 6px solid var(--navy);
}

.eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.95;
}

.primaryLink,
.actions a,
.actions button,
.viewerActions a,
.viewerActions button,
.dialogActions a,
.dialogActions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 2px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  font-weight: 800;
}

.primaryLink {
  border-color: rgba(255, 255, 255, 0.8);
}

.menuGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px clamp(14px, 3vw, 40px) 44px;
}

.menuCard {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 30px rgba(17, 19, 24, 0.1);
}

.preview {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 16px;
  background: #171923;
}

.preview img {
  display: block;
  width: 100%;
  height: min(62vh, 720px);
  object-fit: contain;
}

.preview.landscape img {
  height: auto;
  max-height: min(48vh, 520px);
}

.menuMeta {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.menuMeta h2 {
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.05;
}

.menuMeta p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions a,
.actions button {
  min-width: 120px;
}

.actions button {
  appearance: none;
}

.viewerDialog {
  width: min(100vw, 1600px);
  height: min(100vh, 1000px);
  max-width: 100vw;
  max-height: 100vh;
  padding: 0;
  border: 0;
  background: #101217;
  color: var(--white);
}

.viewerDialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.dialogChrome,
.viewerTopbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 10px 16px;
  background: rgba(16, 18, 23, 0.92);
  color: var(--white);
}

.dialogActions,
.viewerActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dialogStage,
.menuStage {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 62px);
  background: #101217;
}

.dialogStage img,
.menuStage img {
  display: block;
  width: 100%;
  height: calc(100vh - 62px);
  object-fit: contain;
}

.viewerPage {
  min-height: 100vh;
  overflow: hidden;
  background: #101217;
}

.viewerTopbar {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.viewerTopbar > a {
  color: var(--white);
  font-weight: 800;
}

.viewerTopbar strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menuStage:fullscreen,
.dialogStage:fullscreen {
  min-height: 100vh;
}

.menuStage:fullscreen img,
.dialogStage:fullscreen img {
  height: 100vh;
}

@media (max-width: 940px) {
  .pageHeader {
    align-items: flex-start;
    flex-direction: column;
  }

  .menuGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .preview {
    min-height: 260px;
    padding: 10px;
  }

  .preview img {
    height: min(58vh, 520px);
  }

  .dialogChrome,
  .viewerTopbar {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
  }

  .dialogStage,
  .menuStage {
    min-height: calc(100vh - 128px);
  }

  .dialogStage img,
  .menuStage img {
    height: calc(100vh - 128px);
  }
}
