/* Colours and fonts follow grailland.com */
:root {
  --green: #198754;
  --green-hover: #157347;
  --green-light: #e9f7ef;
  --green-mid: #d1e7dd;
  --text: #2c3e50;
  --heading: #212529;
  --muted: #5f6b76;
  --border: #dfe3e6;
  --panel: #ffffff;
  --danger-bg: #fbe9e7;
  --danger: #9b2c1f;
}
* { box-sizing: border-box; }
html { font-size: 20px; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #f1ecdc 100%) fixed;
  color: var(--text);
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.55;
}
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 3px solid #8cbf9f; }
#logo { display: block; height: 64px; width: auto; margin: 0 0 12px; }
.eyebrow {
  font-family: Prata, Georgia, serif;
  color: var(--green);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 8px;
}
h1 { font-family: Lora, Merriweather, Georgia, serif; color: var(--heading); font-size: 1.75rem; line-height: 1.2; margin: 0; font-weight: 500; }
.lead { font-size: 1.1rem; }
label { display: block; margin: 16px 0 6px; color: var(--muted); }
input {
  width: 100%;
  font: inherit;
  font-size: 1.2rem;
  padding: 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
}
input:focus { outline: 3px solid var(--green-mid); border-color: var(--green); }
#code { letter-spacing: .4em; text-align: center; font-size: 1.6rem; }
button { font: inherit; cursor: pointer; }
button.big {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 20px;
  font-size: 1.25rem;
  font-weight: 600;
  border: 0;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
}
button.big:hover { background: var(--green-hover); }
button.big.play { padding: 36px 20px; font-size: 1.5rem; }
button.big:disabled { opacity: .6; cursor: wait; }
button.medium {
  padding: 14px 22px;
  font-weight: 600;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
}
button.medium:hover { background: var(--green-hover); }
button.medium.secondary { background: var(--panel); color: var(--text); border: 2px solid var(--border); }
button.medium.secondary:hover { background: var(--green-light); }
button.link { background: none; border: 0; color: var(--green); text-decoration: underline; padding: 14px 0; }
.small { color: var(--muted); font-size: .85rem; margin: 20px 0 0; }
.message {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 600;
}
.message.info { background: var(--green-mid); color: #0f5132; }
footer { margin-top: 40px; color: var(--muted); font-size: .8rem; }
.row { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }

#stage { position: relative; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(44, 62, 80, .2); }
#stage:fullscreen { border-radius: 0; display: flex; align-items: center; }
#video { display: block; width: 100%; max-height: 80vh; background: #000; }
#stage:fullscreen #video { max-height: 100vh; height: 100%; }
#mark {
  position: absolute;
  left: 8%;
  top: 12%;
  padding: 2px 8px;
  font-size: .75rem;
  color: rgba(255, 255, 255, .28);
  text-shadow: 0 0 3px rgba(0, 0, 0, .6);
  pointer-events: none;
  user-select: none;
  transition: left 2s linear, top 2s linear;
}
[hidden] { display: none !important; }
