/**
 * 認証モーダル（会員登録 / ログイン）
 */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 5, 35, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.auth-modal.is-open {
  display: flex;
  opacity: 1;
}

.auth-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}
.auth-modal.is-open .auth-modal-dialog {
  transform: translateY(0) scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: #666;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.auth-modal-close:hover {
  background: #f3f0fa;
  color: #222;
}

.auth-modal-tabs {
  display: flex;
  border-bottom: 1px solid #ece8f3;
  margin: 0 24px;
  padding-top: 28px;
}
.auth-modal-tab {
  flex: 1;
  padding: 12px 8px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 15px;
  font-weight: 700;
  color: #888;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.auth-modal-tab.is-active {
  color: var(--accent-primary, #5f0cb9);
  border-bottom-color: var(--accent-primary, #5f0cb9);
}
.auth-modal-tab:hover:not(.is-active) {
  color: #555;
}

.auth-modal-body {
  padding: 24px;
}

.auth-modal-panel {
  display: none;
}
.auth-modal-panel.is-active {
  display: block;
}

.auth-modal-heading {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: #1a1a2e;
}
.auth-modal-sub {
  margin: 0 0 18px;
  font-size: 13px;
  color: #666;
}

.auth-modal-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff1f0;
  color: #b9260f;
  border-radius: 8px;
  font-size: 13px;
  white-space: pre-line;
}

.auth-modal-field {
  margin-bottom: 14px;
}
.auth-modal-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #333;
}
.auth-modal-field input {
  width: 100%;
  padding: 11px 12px;
  font-size: 15px;
  border: 1px solid #d9d3e6;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.auth-modal-field input:focus {
  outline: none;
  border-color: var(--accent-primary, #5f0cb9);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb, 95,12,185), 0.15);
}

.auth-modal-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 14px;
}
.auth-modal-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  user-select: none;
}
.auth-modal-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary, #5f0cb9);
  cursor: pointer;
}
.auth-modal-clear {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #888;
  text-decoration: underline;
  cursor: pointer;
}
.auth-modal-clear:hover {
  color: #b9260f;
}

.auth-modal-submit {
  width: 100%;
  padding: 12px 16px;
  margin-top: 4px;
  background: var(--accent-primary, #5f0cb9);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.auth-modal-submit:hover:not(:disabled) {
  background: var(--accent-hover, #4a09a0);
}
.auth-modal-submit:active:not(:disabled) {
  transform: translateY(1px);
}
.auth-modal-submit:disabled,
.auth-modal-submit.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
}
.auth-modal-submit.is-loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-modal-footer {
  margin-top: 14px;
  font-size: 12px;
  color: #777;
  text-align: center;
}
.auth-modal-footer a {
  color: var(--accent-primary, #5f0cb9);
  text-decoration: underline;
}
.auth-modal-switch {
  margin-top: 10px;
  font-size: 13px;
  color: #555;
  text-align: center;
}
.auth-modal-switch button {
  background: none;
  border: none;
  color: var(--accent-primary, #5f0cb9);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-modal { padding: 0; align-items: flex-end; }
  .auth-modal-dialog {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
  }
  .auth-modal-tabs { margin: 0 16px; }
  .auth-modal-body { padding: 18px 16px 24px; }
}

/* === 違反報告モーダル === */
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 5, 35, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.report-modal.is-open {
  display: flex;
  opacity: 1;
}

.report-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}
.report-modal.is-open .report-modal-dialog {
  transform: translateY(0) scale(1);
}

.report-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: #666;
  cursor: pointer;
}
.report-modal-close:hover { background: #f3f0fa; color: #222; }

.report-modal-body { padding: 28px 24px 24px; }

.report-modal-heading {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: #1a1a2e;
}
.report-modal-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: #666;
}

.report-modal-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fff1f0;
  color: #b9260f;
  border-radius: 8px;
  font-size: 13px;
}

.report-modal-reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.report-modal-reasons label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e6dff0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background .15s ease, border-color .15s ease;
}
.report-modal-reasons label:hover {
  background: #f7f4fb;
  border-color: #d6cce8;
}
.report-modal-reasons input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary, #5f0cb9);
}
.report-modal-reasons input[type="radio"]:checked + span {
  font-weight: 700;
  color: var(--accent-primary, #5f0cb9);
}

.report-modal-field { margin-bottom: 16px; }
.report-modal-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #444;
}
.report-modal-field textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.6;
  border: 1px solid #d9d3e6;
  border-radius: 8px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}
.report-modal-field textarea:focus {
  outline: none;
  border-color: var(--accent-primary, #5f0cb9);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb, 95,12,185), 0.15);
}

.report-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.report-modal-cancel,
.report-modal-submit {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.report-modal-cancel {
  background: #f3f0fa;
  color: #555;
}
.report-modal-cancel:hover { background: #e6dff0; }
.report-modal-submit {
  background: var(--accent-primary, #5f0cb9);
  color: #fff;
}
.report-modal-submit:hover:not(:disabled) { background: var(--accent-hover, #4a09a0); }
.report-modal-submit:disabled { opacity: 0.7; cursor: not-allowed; }

@media (max-width: 480px) {
  .report-modal { padding: 0; align-items: flex-end; }
  .report-modal-dialog {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
  }
  .report-modal-body { padding: 24px 16px 20px; }
  .report-modal-reasons { grid-template-columns: 1fr; }
  .report-modal-actions { flex-direction: column-reverse; }
  .report-modal-cancel,
  .report-modal-submit { width: 100%; }
}
