/* ========================================
   体験チェックリスト - Styles v2
   モックに合わせたクリーンデザイン
   ======================================== */

:root {
  --c-bg: #F5F5F3;
  --c-surface: #FFFFFF;
  --c-text: #1A1A19;
  --c-text-2: #71716C;
  --c-text-3: #A3A39E;
  --c-border: rgba(0,0,0,0.06);
  --c-border-hover: rgba(0,0,0,0.12);
  --c-accent: #2563EB;
  --c-accent-light: #EFF6FF;
  --c-accent-dark: #1D4ED8;
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #131312;
    --c-surface: #1E1E1D;
    --c-text: #EDEDEA;
    --c-text-2: #9D9D98;
    --c-text-3: #6B6B66;
    --c-border: rgba(255,255,255,0.06);
    --c-border-hover: rgba(255,255,255,0.12);
    --c-accent: #60A5FA;
    --c-accent-light: #1E293B;
    --c-accent-dark: #93C5FD;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

#app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
}

/* ---- Top bar ---- */
.top-bar {
  padding: 20px 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--c-bg);
}

.top-title { font-size: 18px; font-weight: 600; }
.top-date { font-size: 13px; color: var(--c-text-2); }

/* ---- Tabs ---- */
.tab-nav {
  display: flex;
  padding: 0 20px;
  position: sticky;
  top: 54px;
  z-index: 10;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
}

.tab {
  flex: 1;
  padding: 12px 0 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-3);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}

.tab.active {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

/* ---- Screens ---- */
.screen { display: none; flex: 1; flex-direction: column; }
.screen.active { display: flex; }

.screen-scroll {
  flex: 1;
  padding: 14px 20px 110px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Header / Back ---- */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  color: var(--c-accent);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  padding: 4px 0;
}

.header-time { font-size: 12px; color: var(--c-text-3); }

/* ---- Event info ---- */
.event-info { margin-bottom: 6px; }

.event-title { font-size: 17px; font-weight: 600; }
.event-title .accent { color: var(--c-accent); }

.event-meta { font-size: 13px; color: var(--c-text-2); margin-top: 3px; }
.event-cal { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }

/* ---- Section label / Day label ---- */
.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-3);
  letter-spacing: 0.04em;
  margin: 10px 0 4px;
}

.day-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-3);
  margin: 16px 0 8px;
  letter-spacing: 0.02em;
}

.day-label:first-child { margin-top: 4px; }

/* ---- Booking card (mockup style) ---- */
.booking-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.1s;
  display: flex;
  align-items: center;
  gap: 14px;
}

.booking-card:active { transform: scale(0.98); }

.booking-time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  flex-shrink: 0;
}

.booking-time-start { font-size: 15px; font-weight: 600; line-height: 1.2; }
.booking-time-divider { font-size: 10px; color: var(--c-text-3); line-height: 1.4; }
.booking-time-end { font-size: 12px; color: var(--c-text-3); line-height: 1.2; }

.booking-separator {
  width: 1px;
  align-self: stretch;
  background: var(--c-border);
  flex-shrink: 0;
}

.booking-content { flex: 1; min-width: 0; }

.booking-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

.booking-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-done { background: #DCFCE7; color: #166534; }
.badge-progress { background: #DBEAFE; color: #1E40AF; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-none { background: var(--c-bg); color: var(--c-text-3); }

@media (prefers-color-scheme: dark) {
  .badge-done { background: #14532D; color: #86EFAC; }
  .badge-progress { background: #1E3A5F; color: #93C5FD; }
  .badge-pending { background: #3D2A0F; color: #FCD34D; }
  .badge-none { background: #2A2A28; color: var(--c-text-3); }
}

.booking-detail { font-size: 12px; color: var(--c-text-3); }

/* ---- Checklist option card ---- */
.cl-option {
  background: var(--c-surface);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s;
}

.cl-option.selected { border-color: var(--c-accent); }

.cl-option-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  flex-shrink: 0;
}

.cl-option-info { flex: 1; }
.cl-option-name { font-size: 15px; font-weight: 500; }
.cl-option-count { font-size: 12px; color: var(--c-text-2); margin-top: 2px; }

.cl-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--c-border-hover);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.cl-option.selected .cl-radio {
  border-color: var(--c-accent);
  background: var(--c-accent);
}

.cl-option.selected .cl-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* ---- Progress ---- */
.progress-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 8px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--c-border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--c-accent);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  font-size: 13px;
  color: var(--c-text-2);
  font-weight: 600;
  min-width: 32px;
  text-align: right;
}

/* ---- Checklist items ---- */
.cl-category { margin-top: 2px; }

.cl-category-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-3);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.cl-item {
  background: var(--c-surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.08s;
  margin-bottom: 6px;
  -webkit-user-select: none;
  user-select: none;
}

.cl-item:active { transform: scale(0.98); }

.cl-item-order {
  font-size: 12px;
  color: var(--c-text-3);
  min-width: 18px;
  font-weight: 600;
  text-align: center;
}

.cl-checkbox {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid var(--c-border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.cl-item.checked .cl-checkbox {
  background: var(--c-accent);
  border-color: var(--c-accent);
}

.cl-item.checked .cl-checkbox::after {
  content: '';
  display: block;
  width: 7px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.cl-item-label { font-size: 14px; flex: 1; line-height: 1.4; }

.cl-item.checked .cl-item-label {
  text-decoration: line-through;
  color: var(--c-text-3);
}

/* ---- Action button ---- */
.action-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 400px;
  padding: 15px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  z-index: 5;
}

.action-btn.disabled {
  background: var(--c-surface);
  color: var(--c-text-3);
  cursor: default;
}

.action-btn.ready {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
}

.action-btn.ready:active {
  transform: translateX(-50%) scale(0.97);
}

/* ---- Admin ---- */
.admin-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

.admin-card-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-card-count { font-size: 12px; color: var(--c-text-3); }

.admin-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.admin-items { border-top: 1px solid var(--c-border); }

.admin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--c-border);
  font-size: 14px;
}

.admin-item:last-child { border-bottom: none; }

.admin-item-drag {
  color: var(--c-text-3);
  cursor: grab;
  font-size: 14px;
  user-select: none;
  letter-spacing: 3px;
}

.admin-item-name { flex: 1; }

.admin-item-cat {
  font-size: 11px;
  font-weight: 500;
  color: var(--c-text-3);
  background: var(--c-bg);
  padding: 2px 8px;
  border-radius: 20px;
}

.admin-item-delete {
  background: none;
  border: none;
  color: var(--c-text-3);
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  line-height: 1;
  transition: color 0.15s;
}

.admin-item-delete:hover { color: #DC2626; }

.admin-add-item {
  padding: 11px 16px;
  font-size: 13px;
  color: var(--c-accent);
  cursor: pointer;
  background: none;
  border: none;
  border-top: 1px solid var(--c-border);
  width: 100%;
  text-align: left;
  font-family: var(--font);
  font-weight: 500;
}

.add-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-accent);
  background: none;
  border: 2px dashed var(--c-border-hover);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
}

.add-type-btn:hover { border-color: var(--c-accent); }

/* ---- Color themes ---- */
.theme-blue { background: #DBEAFE; color: #1E40AF; }
.theme-coral { background: #FEE2E2; color: #991B1B; }
.theme-green { background: #DCFCE7; color: #166534; }
.theme-purple { background: #EDE9FE; color: #5B21B6; }
.theme-amber { background: #FEF3C7; color: #92400E; }
.theme-pink { background: #FCE7F3; color: #9D174D; }

@media (prefers-color-scheme: dark) {
  .theme-blue { background: #1E3A5F; color: #93C5FD; }
  .theme-coral { background: #4A1B1B; color: #FCA5A5; }
  .theme-green { background: #14532D; color: #86EFAC; }
  .theme-purple { background: #2E1F5E; color: #C4B5FD; }
  .theme-amber { background: #3D2A0F; color: #FCD34D; }
  .theme-pink { background: #4A1532; color: #F9A8D4; }
}

/* ---- Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.visible { display: flex; animation: fadeIn 0.15s ease; }

.modal {
  background: var(--c-surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 440px;
  animation: slideUp 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(100%); } }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 10px;
}

.modal-title { font-size: 17px; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  color: var(--c-text-2);
  cursor: pointer;
  padding: 4px;
}

.modal-body { padding: 0 20px 16px; }

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 12px 20px 28px;
  border-top: 1px solid var(--c-border);
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-3);
  margin: 14px 0 6px;
}

.form-label:first-child { margin-top: 0; }

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--c-border-hover);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  background: var(--c-surface);
  color: var(--c-text);
}

.form-input:focus { outline: none; border-color: var(--c-accent); }

.toggle-group { display: flex; gap: 8px; }

.toggle-btn {
  flex: 1;
  padding: 9px;
  border: 1.5px solid var(--c-border-hover);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-text-2);
  font-size: 14px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
}

.toggle-btn.active {
  background: var(--c-accent-light);
  color: var(--c-accent);
  border-color: var(--c-accent);
}

.color-options { display: flex; gap: 8px; flex-wrap: wrap; }

.color-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 2.5px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
}

.color-btn.selected { border-color: var(--c-accent); }

.btn-secondary {
  flex: 1;
  padding: 12px;
  background: var(--c-bg);
  color: var(--c-text-2);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
}

.btn-primary {
  flex: 1;
  padding: 12px;
  background: var(--c-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-text);
  color: var(--c-bg);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  transition: bottom 0.3s ease;
  white-space: nowrap;
}

.toast.visible { bottom: 90px; }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--c-text-3);
}

.empty-state-text { font-size: 14px; line-height: 1.6; }

/* ---- Login screen ---- */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  background: var(--c-bg);
  padding: 20px;
}

#login-screen.hidden { display: none; }

.login-container {
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.login-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--c-text-2);
  margin-bottom: 28px;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--c-border-hover);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: var(--font);
  background: var(--c-surface);
  color: var(--c-text);
  text-align: center;
  margin-bottom: 12px;
}

.login-input:focus {
  outline: none;
  border-color: var(--c-accent);
}

.login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  background: var(--c-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.1s;
}

.login-btn:active { transform: scale(0.97); }

.login-error {
  font-size: 13px;
  color: #DC2626;
  margin-top: 12px;
  min-height: 20px;
}
