
* {
  box-sizing: border-box;
}

:root {
  --cream: #f7f3ed;
  --ink: #28251f;
  --muted: #8c857b;
  --accent: #a56d55;
  --line: #e5ddd2;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
  cursor: pointer;
}

.topbar {
  height: 72px;
  padding: 0 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: Georgia, serif;
  font-size: 30px;
  letter-spacing: -2px;
}

.brand span {
  color: var(--accent);
}

.top-note,
.eyebrow,
.control-label,
footer {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}

.app {
  width: min(100% - 32px, 520px);
  margin: 55px auto 70px;
}

.intro {
  text-align: center;
  margin-bottom: 30px;
}

.eyebrow {
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(42px, 9vw, 62px);
  line-height: 0.98;
  font-weight: 400;
  letter-spacing: -2px;
}

h1 span {
  color: var(--accent);
  font-style: italic;
}

.subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 18px;
}

.booth,
.result {
  width: 100%;
}

.camera-frame,
.result-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ded7ce;
  border: 9px solid #fff;
  box-shadow: 0 8px 28px #45372a12;
}

#camera {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #ded7ce;
  transform: scaleX(-1);
}

.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  background: #e9e2d8;
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

.placeholder p {
  font-size: 13px;
}

.camera-icon {
  font-size: 42px;
  color: var(--accent);
}

.frame-label {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-family: Georgia, serif;
  font-size: 14px;
  text-shadow: 0 1px 5px #0008;
  pointer-events: none;
}

.status {
  min-height: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 17px 0;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  border-radius: 3px;
  padding: 0 20px;
  font-size: 12px;
  transition: opacity 0.2s, background 0.2s;
}

.primary-button {
  color: white;
  background: var(--ink);
  border: 1px solid var(--ink);
}

.secondary-button {
  color: var(--ink);
  background: transparent;
  border: 1px solid #cfc5b9;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  opacity: 0.78;
}

.filter-area {
  margin-top: 30px;
  text-align: center;
}

.control-label {
  margin: 0 0 14px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.filter-button {
  padding: 9px 13px;
  border: 1px solid #d9d0c5;
  background: transparent;
  color: var(--muted);
  border-radius: 30px;
  font-size: 11px;
}

.filter-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-family: Georgia, serif;
  font-size: 100px;
  background: #0002;
  text-shadow: 0 2px 15px #0008;
  pointer-events: none;
}

.result {
  margin-top: 45px;
  text-align: center;
}

.result-frame {
  margin-bottom: 18px;
}

#photoCanvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

footer {
  text-align: center;
  padding: 25px 12px 35px;
}

.hidden {
  display: none !important;
}

@media (max-width: 420px) {
  .topbar {
    padding: 0 20px;
  }

  .top-note {
    font-size: 8px;
    letter-spacing: 1px;
  }

  .app {
    margin-top: 38px;
  }

  .controls {
    gap: 7px;
  }

  .primary-button,
  .secondary-button {
    padding: 0 13px;
    font-size: 11px;
  }
}
