/* 共通カメラUI — diagnosis / photo-fitting 共用 */

#camera-phase {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #111;
}

#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

#status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 52px 60px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
  text-align: center;
}

#status {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

#btn-close {
  position: absolute;
  top: 48px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 10;
}

#btn-close .material-symbols-outlined {
  color: #fff;
  font-size: 20px;
}

#face-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 320px;
  border: 3px dashed rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  transition: border-color 0.3s, border-style 0.3s, box-shadow 0.3s;
}

#face-guide.ready {
  border-color: #4caf50;
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.25);
}

.btn-action {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2), 0 4px 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: opacity 0.3s, transform 0.2s;
  z-index: 5;
}

.btn-action .btn-icon {
  font-size: 28px;
  color: #333;
}

.btn-action .btn-label {
  font-size: 11px;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.06em;
}

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

.btn-action:not(:disabled):active {
  transform: translate(-50%, -50%) scale(0.95);
}

/* ── 同意画面 ──────────────────────────────── */
#consent-phase {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f5f0;
  padding: 24px;
}

.consent-card {
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.consent-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 24px;
  line-height: 1.6;
}

.consent-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}

.consent-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.consent-list li:last-child {
  border-bottom: none;
}

.consent-list .material-symbols-outlined {
  color: #4caf50;
  font-size: 22px;
  flex-shrink: 0;
}

.consent-actions {
  display: flex;
  gap: 12px;
}

.consent-actions button {
  flex: 1;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}

#btn-consent-agree {
  background: #333;
  color: #fff;
  border: none;
}

#btn-consent-disagree {
  background: transparent;
  color: #999;
  border: 1px solid #ddd;
}

/* ── 商品情報バー ──────────────────────────── */
#product-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  padding-bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
}

#product-bar .product-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
}

#product-bar .product-name {
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 480px) {
  #face-guide {
    width: 200px;
    height: 280px;
  }

  .btn-action {
    width: 88px;
    height: 88px;
  }

  .btn-action .btn-icon {
    font-size: 24px;
  }

  .btn-action .btn-label {
    font-size: 10px;
  }
}
