@charset "UTF-8";

html { background: #dde4df; }

.camera-app-body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: #17211d;
  background: #dde4df;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  line-height: 1.6;
}

.camera-screen {
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 5%, rgba(255,255,255,.65) 0 2px, transparent 3px),
    radial-gradient(circle at 12% 17%, rgba(255,255,255,.56) 0 1.5px, transparent 2.5px),
    linear-gradient(180deg, #edf4f2 0, #f7f4ec 190px, #f7f4ec 100%);
}

.camera-appbar {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 78px;
  padding-top: env(safe-area-inset-top);
}

.camera-appbar > div { text-align: center; }
.camera-appbar p { margin: 0; color: #a33b32; font-family: Georgia, serif; font-size: .62rem; font-weight: 700; letter-spacing: .18em; }
.camera-appbar h1 { margin: 1px 0 0; font-size: 1.05rem; line-height: 1.25; letter-spacing: .04em; }

.camera-back,
.camera-appbar-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23,63,53,.14);
  border-radius: 50%;
  color: #173f35;
  background: rgba(255,255,255,.72);
  font-size: 1.1rem;
  text-decoration: none;
}

.camera-appbar-mark { justify-self: end; border-color: transparent; color: #c7a770; background: transparent; }
.camera-workspace { padding-top: 2px; }
.camera-app { width: 100%; }

.camera-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 26px;
  background: #17211d;
  box-shadow: 0 18px 40px rgba(23, 33, 29, .18);
}

.camera-video,
.camera-frame,
.camera-result { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.camera-video { object-fit: cover; background: #17211d; }
.camera-video.is-mirrored { transform: scaleX(-1); }
.camera-frame { z-index: 10; pointer-events: none; }
.camera-result { z-index: 11; background: #17211d; }
.camera-video[hidden], .camera-frame[hidden], .camera-result[hidden] { display: none; }

.camera-placeholder {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: rgba(255,255,255,.82);
  background: linear-gradient(155deg, #29463e, #17211d 72%);
}

.camera-placeholder[hidden] { display: none; }

.camera-placeholder-mark {
  position: relative;
  width: 66px;
  height: 66px;
  display: block;
  margin: 0 auto 18px;
  border: 4px solid rgba(255,255,255,.9);
  border-radius: 50%;
}

.camera-placeholder-mark::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #a33b32; }
.camera-placeholder p { margin: 0; font-size: .86rem; line-height: 1.75; letter-spacing: .05em; }

.camera-status {
  min-height: 3.2em;
  margin: 12px 6px 0;
  color: #69716d;
  font-size: .72rem;
  line-height: 1.6;
  text-align: center;
}

.camera-controls,
.camera-actions {
  display: grid;
  grid-template-columns: 1fr 82px 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(23,63,53,.1);
  border-radius: 22px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 26px rgba(23,33,29,.08);
}

.camera-actions { grid-template-columns: repeat(3, 1fr); }
.camera-controls[hidden], .camera-actions[hidden] { display: none; }
.camera-post[hidden] { display: none; }
.camera-post { margin-top: 18px; }
.camera-post p { color: #5e6561; font-size: .76rem; line-height: 1.8; }
.camera-button-x { color: #fff; background: #17211d; text-decoration: none; }

.camera-button {
  min-width: 0;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 7px;
  border: 0;
  border-radius: 14px;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}

.camera-button:focus-visible,
.camera-shutter:focus-visible,
.camera-file-label:focus-visible,
.camera-back:focus-visible,
.camera-help summary:focus-visible { outline: 3px solid #c7a770; outline-offset: 3px; }

.camera-button:disabled { cursor: not-allowed; opacity: .38; }
.camera-button-primary { color: #fff; background: #a33b32; }
.camera-button-secondary { color: #173f35; background: #e9efec; }
.camera-button-share { color: #fff; background: #173f35; }

.camera-shutter {
  width: 72px;
  height: 72px;
  justify-self: center;
  padding: 6px;
  border: 3px solid #a33b32;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.camera-shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #a33b32; }
.camera-shutter:disabled { border-color: #aeb5b1; cursor: not-allowed; opacity: .55; }
.camera-shutter:disabled span { background: #cbd0cd; }

.camera-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 4px 0;
  color: #737873;
  font-size: .72rem;
}

.camera-file-label { padding: 8px 12px; border-radius: 999px; color: #173f35; background: #e2e9e5; font-weight: 800; cursor: pointer; }

.camera-help {
  margin: 22px 4px 0;
  border-top: 1px solid rgba(23,63,53,.12);
  color: #5e6561;
  font-size: .76rem;
}

.camera-help summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #173f35;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.camera-help summary::-webkit-details-marker { display: none; }
.camera-help summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; }
.camera-help[open] summary::after { content: "−"; }
.camera-help > div { padding: 0 3px 18px; }
.camera-help ol { margin: 0; padding-left: 1.4em; }
.camera-help p { margin: 13px 0 0; line-height: 1.8; }
.camera-help a { display: inline-block; margin-top: 12px; color: #173f35; text-underline-offset: 3px; }

@media (min-width: 481px) {
  .camera-screen { box-shadow: 0 0 50px rgba(23,33,29,.14); }
}

@media (max-width: 359px) {
  .camera-screen { padding-inline: 12px; }
  .camera-appbar { min-height: 70px; }
  .camera-stage { border-radius: 22px; }
  .camera-controls, .camera-actions { gap: 9px; padding-inline: 10px; }
  .camera-controls { grid-template-columns: 1fr 72px 1fr; }
  .camera-shutter { width: 66px; height: 66px; }
  .camera-button { font-size: .7rem; }
}
