:root {
  --bg: #fff8f2;
  --surface: #ffffff;
  --surface-soft: #f2e8e1;
  --text: #5f584b;
  --text-muted: #999287;
  --accent: #ffb820;
  --accent-secondary: #86a578;
  --error: #c17767;
  --border: #e1d4ca;
  --border-soft: #f2e8e1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family:
    "SF Pro Text",
    "SF Pro Display",
    "Avenir Next",
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}

.layout {
  max-width: 430px;
  margin: 0 auto;
  padding: 1rem 0.9rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 0.85rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 1rem;
  box-shadow: 0 8px 28px rgba(95, 88, 75, 0.06);
}

h1,
h2 {
  margin: 0 0 0.5rem;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 1.55rem;
  font-weight: 800;
}

h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

p {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
}

.status {
  margin-top: 0.85rem;
  padding: 0.72rem 0.85rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent-secondary) 14%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--accent-secondary) 45%, #ffffff);
  color: #53654a;
  font-size: 0.95rem;
}

.status.error {
  background: color-mix(in srgb, var(--error) 15%, #ffffff);
  border-color: color-mix(in srgb, var(--error) 45%, #ffffff);
  color: #8f5a4e;
}

.btn {
  appearance: none;
  border: 0;
  width: 100%;
  border-radius: 999px;
  padding: 0.9rem 1rem;
  background: var(--accent);
  color: #5f584b;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 184, 32, 0.28);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-secondary {
  margin-top: 0.55rem;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-180 {
  margin-top: 0.55rem;
  background: var(--accent-secondary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(134, 165, 120, 0.28);
}

.is-hidden {
  display: none;
}

.liqa-host {
  width: min(100%, 360px);
  margin: 0 auto;
  min-height: 0;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
}

.liqa-host hautai-liqa {
  display: block;
  width: 100%;
  height: 100%;
}

#capture-count {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.captures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.capture {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fffdfb;
}

.capture img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  display: block;
}

.capture figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.45rem 0.55rem;
}

code {
  background: #f7efe9;
  padding: 0.12rem 0.32rem;
  border-radius: 6px;
  color: #7a7163;
}

@media (min-width: 760px) {
  .layout {
    max-width: 520px;
  }

  .captures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capture img {
    height: 132px;
  }
}
