/* ============================================
   うちだけの朝活 - ウッド調カフェデザイン
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700&family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --color-primary: #8B6F47;
  --color-primary-light: #C9A96E;
  --color-primary-dark: #6B4F36;
  --color-secondary: #7A9E6F;
  --color-secondary-light: #A8C49E;
  --color-accent: #D4A574;
  --color-bg: #FBF5EC;
  --color-bg-card: #FFFFFF;
  --color-bg-section: #F5EDE0;
  --color-bg-warm: #F0E6D6;
  --color-text: #3C2415;
  --color-text-light: #6B5B4E;
  --color-text-muted: #A09080;
  --color-success: #5B8C5A;
  --color-success-light: #E8F0E7;
  --color-warning: #D4A04A;
  --color-warning-light: #FFF5E0;
  --color-danger: #C0654A;
  --color-danger-light: #FCE8E3;
  --color-border: #DDD0C0;
  --color-border-light: #EDE5D8;
  --shadow-sm: 0 1px 3px rgba(60,36,21,0.06);
  --shadow-md: 0 4px 12px rgba(60,36,21,0.08);
  --shadow-lg: 0 8px 24px rgba(60,36,21,0.10);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.25s ease;
  --font-heading: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary-dark);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
  color: var(--color-primary-dark);
}

.section-subtitle {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.page-content {
  padding: 2rem 0;
  min-height: calc(100vh - 70px - 80px);
}

.section {
  margin-bottom: 3rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border-light);
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo .logo-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-light);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
  padding: 0.5rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--color-primary);
  color: white;
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-bg-section);
  color: var(--color-text);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--color-border);
}

.btn-success {
  background: var(--color-success);
  color: white;
}
.btn-success:hover:not(:disabled) {
  background: #4a7a49;
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}
.btn-danger:hover:not(:disabled) {
  background: #a0503a;
}

.btn-warning {
  background: var(--color-warning);
  color: var(--color-text);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
}

.card-body {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ============================================
   Hero Section - Café Style
   ============================================ */
.hero {
  background: linear-gradient(135deg, #A08060 0%, #C9A96E 50%, #D4B896 100%);
  padding: 3rem 1rem 2.5rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 1rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: white;
  text-shadow: 0 2px 8px rgba(60,36,21,0.2);
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.hero-tagline {
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================
   Decorative Illustrations
   ============================================ */
.illust-deco {
  position: absolute;
  opacity: 0.12;
  pointer-events: none;
}

.illust-deco img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ============================================
   Target Audience Section
   ============================================ */
.target-section {
  background: var(--color-bg-warm);
  padding: 3rem 1rem;
  position: relative;
}

.target-section h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.target-subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.target-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 700px;
  margin: 0 auto;
}

.target-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: 0.6rem 1.3rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.target-item:hover {
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.target-item .target-icon {
  font-size: 1.1rem;
}

/* ============================================
   About / Mentors Section
   ============================================ */
.about-section {
  padding: 3rem 1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 2rem auto 0;
}

.about-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.about-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.about-portrait {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 4px solid var(--color-accent);
  box-shadow: 0 4px 12px rgba(60,36,21,0.15);
}

.about-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.25rem;
}

.about-role {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.about-desc {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ============================================
   Mentors Compact
   ============================================ */
.mentors-label {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.mentors-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.mentor-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.mentor-mini-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
}

.mentor-mini-name {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.mentors-and {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-top: -1rem;
}

/* ============================================
   What We Do Section
   ============================================ */
.whatwedo-section {
  background: var(--color-bg-warm);
  padding: 3rem 1rem;
}

.whatwedo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 850px;
  margin: 2rem auto 0;
}

.whatwedo-item {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

.whatwedo-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.whatwedo-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.5rem;
}

.whatwedo-desc {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ============================================
   Info Bar
   ============================================ */
.info-bar {
  background: var(--color-primary-dark);
  color: white;
  padding: 1rem;
  text-align: center;
}

.info-bar-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.info-bar-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.info-bar-item .info-icon {
  font-size: 1.1rem;
}

/* ============================================
   Calendar
   ============================================ */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.calendar-header h2 {
  font-size: 1.3rem;
}

.calendar-nav {
  display: flex;
  gap: 0.5rem;
}

.calendar-nav button {
  background: var(--color-bg-section);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
  color: var(--color-text);
}

.calendar-nav button:hover {
  background: var(--color-primary-light);
  color: white;
  border-color: var(--color-primary-light);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.calendar-weekday {
  background: var(--color-primary);
  color: white;
  text-align: center;
  padding: 0.6rem 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.calendar-day {
  background: var(--color-bg-card);
  min-height: 90px;
  padding: 0.4rem;
  position: relative;
  cursor: default;
  transition: var(--transition);
}

.calendar-day.other-month {
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.calendar-day.today {
  background: rgba(201, 169, 110, 0.15);
}

.calendar-day.today .day-number {
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-number {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.day-event {
  background: var(--color-primary-light);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-event:hover {
  background: var(--color-primary);
}

.day-event.full {
  background: var(--color-text-muted);
}

.day-event.almost-full {
  background: var(--color-danger);
}

.day-event.cancelled {
  background: var(--color-danger);
  opacity: 0.6;
  text-decoration: line-through;
}

.calendar-day.sunday .day-number {
  color: var(--color-danger);
}

.calendar-day.saturday .day-number {
  color: #5B8DB5;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.form-group .required {
  color: var(--color-danger);
  margin-left: 0.25rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--color-bg-card);
  color: var(--color-text);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.12);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B5B4E' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.form-inline {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.form-inline .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* ============================================
   Auth Page
   ============================================ */
.auth-container {
  max-width: 440px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.auth-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
}

.auth-logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin: 0 auto 0.5rem;
}

.auth-tabs {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--color-border-light);
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-text-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-size: 1rem;
}

.auth-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-divider {
  text-align: center;
  color: var(--color-text-muted);
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

/* ============================================
   Passport (Point Card)
   ============================================ */
.point-card-visual {
  background: linear-gradient(135deg, #8B6F47, #C9A96E);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.point-card-visual::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.point-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.point-card-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  opacity: 0.9;
}

.point-card-number {
  font-size: 0.8rem;
  opacity: 0.7;
}

.point-dots {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.point-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.point-dot.filled {
  background: white;
  border-color: white;
  color: var(--color-primary);
}

.point-dot.empty {
  background: rgba(255,255,255,0.15);
}

.point-card-reward {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.point-card-complete {
  background: linear-gradient(135deg, var(--color-success), #6fa06e);
}

/* ============================================
   Ticket Display
   ============================================ */
.ticket-card {
  border: 2px dashed var(--color-primary-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(to bottom right, var(--color-bg-card), var(--color-bg-section));
}

.ticket-card .ticket-type {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
}

.ticket-card .ticket-price {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.ticket-card .ticket-savings {
  color: var(--color-success);
  font-size: 0.85rem;
  font-weight: 500;
}

.ticket-card .ticket-per-use {
  color: var(--color-text-light);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.ticket-remaining {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--color-success-light);
  color: var(--color-success);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ============================================
   Status Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-open { background: var(--color-success-light); color: var(--color-success); }
.badge-closed { background: var(--color-danger-light); color: var(--color-danger); }
.badge-cancelled { background: #EDEDED; color: var(--color-text-muted); }
.badge-pending { background: var(--color-warning-light); color: #B88B2A; }
.badge-confirmed { background: var(--color-success-light); color: var(--color-success); }
.badge-attended { background: #E3EEF6; color: #3A7CAD; }
.badge-approved { background: var(--color-success-light); color: var(--color-success); }
.badge-rejected { background: var(--color-danger-light); color: var(--color-danger); }

/* ============================================
   Tables
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--color-bg-section);
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-light);
  font-size: 0.85rem;
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border-light);
}

tbody tr:hover {
  background: rgba(139, 111, 71, 0.03);
}

/* ============================================
   Tabs (Admin Panel)
   ============================================ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border-light);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  border: none;
  background: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--color-primary);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(60,36,21,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal-overlay.modal-active {
  display: flex;
}

.modal-content {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: var(--transition);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background: var(--color-bg-section);
  color: var(--color-text);
}

.modal-content h3 {
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

.confirm-dialog {
  max-width: 400px;
  text-align: center;
}

.confirm-dialog p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.confirm-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ============================================
   Toast
   ============================================ */
#toast-container {
  position: fixed;
  top: 80px;
  right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  font-size: 0.9rem;
  background: var(--color-bg-card);
}

.toast.toast-show {
  transform: translateX(0);
}

.toast-success { border-left: 4px solid var(--color-success); }
.toast-error { border-left: 4px solid var(--color-danger); }
.toast-info { border-left: 4px solid var(--color-secondary); }

.toast-icon {
  font-size: 1.1rem;
}

.toast-success .toast-icon { color: var(--color-success); }
.toast-error .toast-icon { color: var(--color-danger); }
.toast-info .toast-icon { color: var(--color-secondary); }

/* ============================================
   Loading & Empty
   ============================================ */
.loading-spinner {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
}

/* ============================================
   Records / History
   ============================================ */
.record-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  transition: var(--transition);
}

.record-card:hover {
  box-shadow: var(--shadow-md);
}

.record-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 4px;
}

.record-photos img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  cursor: pointer;
  transition: var(--transition);
}

.record-photos img:hover {
  opacity: 0.85;
}

.record-body {
  padding: 1rem;
}

.record-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.record-note {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ============================================
   Pricing Section (Compact)
   ============================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.pricing-card {
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 1.2rem 1rem;
  text-align: center;
  background: var(--color-bg-card);
  position: relative;
  transition: var(--transition);
}

.pricing-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.pricing-card.recommended {
  border-color: var(--color-primary);
}

.pricing-card.recommended::before {
  content: 'おすすめ';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  padding: 0.1rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.pricing-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.pricing-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
}

.pricing-price span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-text-light);
}

.pricing-detail {
  color: var(--color-text-light);
  font-size: 0.75rem;
  margin: 0.3rem 0 0.5rem;
}

.pricing-savings {
  color: var(--color-success);
  font-weight: 500;
  font-size: 0.75rem;
}

/* ============================================
   Passport Info Section
   ============================================ */
.passport-info {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 500px;
}

.passport-reward {
  background: var(--color-bg-section);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.passport-reward-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
}

.passport-reward-desc {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--color-primary-dark);
  padding: 1.5rem 0;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}

.footer a {
  color: rgba(255,255,255,0.8);
}

/* ============================================
   Photo Upload
   ============================================ */
.photo-upload-area {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--color-text-muted);
}

.photo-upload-area:hover {
  border-color: var(--color-primary);
  background: rgba(139, 111, 71, 0.03);
}

.photo-upload-area .upload-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.photo-preview-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.photo-preview-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.photo-preview-item .remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   Event Detail Modal
   ============================================ */
.event-detail-time {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.event-detail-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.event-detail-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.event-detail-row .icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.capacity-bar {
  width: 100%;
  height: 8px;
  background: var(--color-border-light);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.capacity-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.capacity-fill.low { background: var(--color-success); }
.capacity-fill.mid { background: var(--color-warning); }
.capacity-fill.high { background: var(--color-danger); }

/* ============================================
   Admin: User List
   ============================================ */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.user-info-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================
   Wood Texture Decorative Border
   ============================================ */
.wood-divider {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav-hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--color-border-light);
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
  }

  .nav-links a:hover {
    background: var(--color-bg-section);
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .calendar-day {
    min-height: 60px;
    padding: 0.25rem;
  }

  .day-number {
    font-size: 0.75rem;
  }

  .day-event {
    font-size: 0.6rem;
    padding: 0.1rem 0.2rem;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }

  .whatwedo-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }

  .auth-card {
    padding: 1.5rem;
  }

  .tabs {
    gap: 0;
  }

  .tab-btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }

  .form-inline {
    flex-direction: column;
  }

  .modal-content {
    padding: 1.25rem;
    margin: 0.5rem;
  }

  .table-wrapper {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.5rem 0.6rem;
  }

  .info-bar-inner {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .calendar-weekday {
    font-size: 0.7rem;
    padding: 0.4rem 0.1rem;
  }

  .calendar-day {
    min-height: 50px;
  }

  .point-dots {
    gap: 0.3rem;
  }

  .point-dot {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .target-list {
    gap: 0.5rem;
  }

  .target-item {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
}
