* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'メイリオ', 'Hiragino Kaku Gothic ProN', sans-serif;
  background: #f8fafc;
  color: #1e293b;
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: #111827;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: #2563eb;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome {
  font-size: 0.95rem;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-outline {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}

.btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-danger:hover {
  background: #fecaca;
  color: #b91c1c;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.subtitle {
  color: #475569;
  margin-bottom: 24px;
  font-size: 1rem;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.auth-card {
  max-width: 420px;
}

.upload-card {
  max-width: 640px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #374151;
}

.text-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: #111827;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.text-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.file-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed #9ca3af;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  color: #374151;
  cursor: pointer;
}

.file-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hint {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #475569;
}

button[type="submit"].btn-primary,
.btn.btn-primary.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

.progress {
  background: #e5e7eb;
  border-radius: 6px;
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
}

.progress-bar {
  background: #2563eb;
  height: 100%;
  border-radius: 6px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  margin-top: 8px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.file-table th,
.file-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

.file-table th {
  background: #f9fafb;
  font-weight: 600;
  font-size: 0.82rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.file-table tr:last-child td {
  border-bottom: none;
}

.file-table tr:hover td {
  background: #fafbfc;
}

.empty {
  color: #475569;
  text-align: center;
  padding: 32px 0;
  font-size: 1rem;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.center {
  text-align: center;
}

/* ===== ホームページ専用アニメーション ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out forwards;
}

.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }
.animate-delay-5 { animation-delay: 0.5s; opacity: 0; }
.animate-delay-6 { animation-delay: 0.6s; opacity: 0; }

/* ===== ホームページ ===== */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #111827;
  margin: 0 0 16px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero .gradient-text {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: #4b5563;
  margin: 0 0 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-actions .btn {
  padding: 14px 28px;
  font-size: 1.05rem;
  min-width: 150px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 0 20px 80px;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px;
}

.feature-card p {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.steps {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 80px 20px;
}

.steps .container {
  max-width: 900px;
  margin: 0 auto;
}

.steps h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 48px;
}

.step-list {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 240px;
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  background: #2563eb;
  color: #ffffff;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.step-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.step-item p {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.home-card {
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .hero {
    padding: 60px 16px 40px;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 260px;
  }

  .features {
    grid-template-columns: 1fr;
    padding: 0 16px 60px;
  }

  .step-list {
    flex-direction: column;
    align-items: center;
  }

  .step-item {
    flex-direction: row;
    text-align: left;
    width: 100%;
    max-width: 320px;
  }

  .step-number {
    flex-shrink: 0;
  }
}

/* ===== ホームページ：カッコよく色鮮やかに ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  color: #ffffff;
  padding: 120px 20px 100px;
  text-align: center;
  margin-bottom: 0;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%);
  overflow: hidden;
}

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

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 16px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, #22d3ee 0%, #a855f7 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 .sub {
  color: #ffffff;
  font-weight: 400;
  font-size: 0.9em;
}

.lead {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: #e2e8f0;
  margin: 0 0 36px;
  line-height: 1.8;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-actions .btn {
  padding: 16px 32px;
  font-size: 1.1rem;
  min-width: 180px;
  border-radius: 10px;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
  min-width: 180px;
}

.btn-primary {
  background: #2563eb;
  border: none;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-outline {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
  transform: translateY(-1px);
}

/* ヒーロー（暗い背景）上のアウトラインボタンは白文字にする */
.hero-actions .btn-outline {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
  color: #ffffff;
}

.btn-danger {
  background: #dc2626;
  border: none;
  color: #ffffff;
}

.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* 浮遊アニメーション */
.hero-float {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.float-item {
  position: absolute;
  font-size: 3rem;
  opacity: 0.7;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
  animation: float 6s ease-in-out infinite;
}

.float-1 { top: 15%; left: 10%; animation-delay: 0s; font-size: 2.5rem; }
.float-2 { top: 10%; right: 15%; animation-delay: 1s; font-size: 3rem; }
.float-3 { bottom: 20%; left: 20%; animation-delay: 2s; font-size: 2rem; }
.float-4 { bottom: 15%; right: 25%; animation-delay: 3s; font-size: 2.8rem; }
.float-5 { top: 40%; left: 50%; animation-delay: 4s; font-size: 2.2rem; }

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* 機能セクション */
.features {
  background: #ffffff;
  padding: 100px 20px;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #111827 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: 1.1rem;
  color: #475569;
  margin: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 100px;
}

.feature-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.25);
  border-color: transparent;
  color: #ffffff;
}

.feature-card:hover .card-icon {
  transform: scale(1.2) rotate(5deg);
}

.feature-card:hover h3,
.feature-card:hover p {
  color: #ffffff;
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
  transition: transform 0.4s ease;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
}

.feature-card p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ステップセクション */
.steps {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 100px 20px;
}

.steps h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #111827 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 260px;
  text-align: center;
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 24px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.step-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
  border-color: #2563eb;
}

.step-number {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff;
  border-radius: 50%;
  font-size: 1.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.step-item h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.step-item p {
  color: #475569;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .hero {
    padding: 90px 16px 70px;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 80px;
  }

  .step-list {
    flex-direction: column;
    align-items: center;
  }

  .step-item {
    flex-direction: row;
    text-align: left;
    width: 100%;
    max-width: 340px;
  }

  .step-number {
    flex-shrink: 0;
  }
}

/* ===== ルーム（アップローダー場）スタイル ===== */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.room-actions {
  margin-bottom: 32px;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.room-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.room-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
}

.room-card-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.room-icon {
  font-size: 1.75rem;
}

.room-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.room-card-body {
  margin-bottom: 16px;
}

.room-owner {
  font-size: 0.9rem;
  color: #2563eb;
  font-weight: 600;
  margin: 0 0 6px;
}

.room-created {
  font-size: 0.85rem;
  color: #475569;
  margin: 0;
}

.room-card-footer {
  display: flex;
  justify-content: flex-end;
}

.room-header-bar {
  margin-bottom: 24px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state p {
  color: #475569;
}

.room-header-bar .badge {
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .room-grid {
    grid-template-columns: 1fr;
  }

  .room-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ===== ヘッダー：ダークテーマ ===== */
header {
  background: #1e293b;
  border-bottom: 1px solid #334155;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: #f8fafc;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.welcome {
  font-size: 0.92rem;
  font-weight: 500;
  color: #e2e8f0;
  white-space: nowrap;
}

/* ヘッダー内ボタン：白背景と被らないようダークテイスト */
.nav-actions .btn-outline {
  background: #334155;
  color: #f8fafc;
  border-color: #475569;
}

.nav-actions .btn-outline:hover {
  background: #475569;
  border-color: #64748b;
  color: #ffffff;
}

.nav-actions .btn-primary {
  background: #2563eb;
  border: none;
  color: #ffffff;
}

.nav-actions .btn-primary:hover {
  background: #1d4ed8;
}

/* ===== 固定トップナビゲーションバー ===== */
.top-nav {
  position: sticky;
  top: 58px; /* ヘッダーの高さ分 */
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  z-index: 40;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.top-nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav-inner::-webkit-scrollbar {
  display: none;
}

.top-nav-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.top-nav-item:hover {
  background: #1e293b;
  color: #ffffff;
}

.top-nav-item.active {
  color: #ffffff;
  background: #2563eb;
  border-bottom: 2px solid #2563eb;
  box-shadow: inset 0 -2px 0 0 #2563eb;
}

.top-nav-logout {
  color: #f87171;
  margin-left: auto;
}

.top-nav-logout:hover {
  color: #ffffff;
  background: #dc2626;
}

.top-nav-logout:hover {
  color: #ffffff;
  background: #dc2626;
}

.top-nav-register {
  background: #2563eb;
  color: #ffffff;
}

.top-nav-register:hover {
  background: #1d4ed8;
}

/* メインコンテンツの上部余白をナビゲーション分確保 */
main.container {
  padding-top: 80px;
}

@media (max-width: 640px) {
  .top-nav-inner {
    gap: 2px;
  }

  .top-nav-item {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .nav-actions .welcome {
    display: none;
  }
}

/* 背景と文字色のコントラストを改善（すべての見づらい文字を修正） */
.feature span {
  color: #475569 !important;
}

.empty-state p {
  color: #475569;
}

/* ===== 未ログインホーム（シンプル版ランディング） ===== */
main.container.main-full {
  max-width: none;
  margin: 0;
  padding: 0;
}

.lp {
  position: relative;
  overflow: hidden;
  background: #0b1120;
  color: #e2e8f0;
  text-align: center;
  padding: 120px 24px 104px;
}

.lp::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}

.lp-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 45% 45% at 50% 0%, rgba(56, 189, 248, 0.14), transparent 70%),
    radial-gradient(ellipse 35% 35% at 80% 45%, rgba(37, 99, 235, 0.12), transparent 70%);
  pointer-events: none;
}

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

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 28px;
}

.lp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.9);
}

.lp-title {
  font-size: clamp(2.4rem, 6.4vw, 4.3rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: #f8fafc;
  margin: 0 0 26px;
}

.lp-accent {
  color: #38bdf8;
}

.lp-lead {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.9;
  color: #94a3b8;
  margin: 0 auto 40px;
  max-width: 34em;
}

.lp-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 176px;
  padding: 14px 30px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.lp-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.lp-btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.lp-btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #334155;
  color: #e2e8f0;
}

.lp-btn-ghost:hover {
  background: #1e293b;
  border-color: #475569;
  color: #ffffff;
  transform: translateY(-1px);
}

.lp-meta {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 44px 0 0;
  padding: 0;
  font-size: 0.88rem;
  color: #94a3b8;
}

.lp-meta li {
  display: flex;
  align-items: center;
}

.lp-meta li + li::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #475569;
  margin-right: 22px;
}

.lp-features {
  background: #0b1120;
  border-top: 1px solid #1e293b;
  padding: 72px 24px 96px;
}

.lp-features-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #1e293b;
  border: 1px solid #1e293b;
  border-radius: 16px;
  overflow: hidden;
}

.lp-feature {
  background: #0f172a;
  padding: 32px 28px;
  text-align: left;
}

.lp-feature svg {
  width: 22px;
  height: 22px;
  color: #38bdf8;
  margin-bottom: 18px;
}

.lp-feature h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.lp-feature p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: #94a3b8;
  margin: 0;
}

@media (max-width: 760px) {
  .lp {
    padding: 88px 20px 72px;
  }

  .lp-features {
    padding: 56px 20px 72px;
  }

  .lp-features-inner {
    grid-template-columns: 1fr;
  }

  .lp-br {
    display: none;
  }
}

/* ===== 公開ページのヘッダー（uploader.jp 風の明るいヘッダー） ===== */
header.header-public {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.header-public .logo {
  color: #1d4ed8;
}

.header-public .logo:hover {
  color: #1e40af;
}

.header-public .nav-actions .btn-outline {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

.header-public .nav-actions .btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.header-public .nav-actions .btn-primary {
  background: #2563eb;
}

.header-public .nav-actions .btn-primary:hover {
  background: #1d4ed8;
}

/* ===== uploader.jp 風ホーム ===== */
.up-hero {
  background: linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 92px 20px 80px;
  text-align: center;
}

.up-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.up-hero .up-container {
  padding: 0;
}

.up-kicker {
  display: inline-block;
  margin: 0 0 18px;
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.up-title {
  font-size: clamp(2.2rem, 5.6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 22px;
}

.up-accent {
  color: #2563eb;
}

.up-lead {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.9;
  color: #475569;
  margin: 0 auto 32px;
  max-width: 38em;
}

.up-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.up-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  padding: 12px 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.up-btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.up-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.up-btn-default {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

.up-btn-default:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}

.up-note {
  margin: 22px 0 0;
  color: #64748b;
  font-size: 0.85rem;
}

.up-features {
  background: #ffffff;
  padding: 64px 20px;
  border-bottom: 1px solid #eef2f7;
}

.up-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.up-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.up-icon svg {
  width: 22px;
  height: 22px;
}

.up-feature h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}

.up-feature p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: #475569;
  margin: 0;
}

.up-about {
  background: #f8fafc;
  padding: 72px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.up-about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: start;
}

.up-about-text h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 14px;
}

.up-about-text p {
  color: #475569;
  line-height: 1.9;
  font-size: 0.95rem;
  margin: 0 0 18px;
}

.up-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.up-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: #374151;
  font-size: 0.92rem;
}

.up-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}

.up-spec {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.9rem;
}

.up-spec caption {
  caption-side: top;
  text-align: left;
  color: #6b7280;
  font-size: 0.82rem;
  padding: 0 0 8px;
}

.up-spec th {
  width: 42%;
  text-align: left;
  background: #f1f5f9;
  color: #374151;
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.up-spec td {
  padding: 11px 14px;
  color: #475569;
  border-bottom: 1px solid #eef2f7;
}

.up-spec tr:last-child th,
.up-spec tr:last-child td {
  border-bottom: none;
}

.up-band {
  background: #1d4ed8;
  padding: 52px 20px;
  text-align: center;
}

.up-band-title {
  margin: 0 0 22px;
  color: #ffffff;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.up-band .up-btn-primary {
  background: #ffffff;
  border-color: #ffffff;
  color: #1d4ed8;
}

.up-band .up-btn-primary:hover {
  background: #eff6ff;
  border-color: #eff6ff;
}

/* ===== getuploader 風アップローダー場 ===== */
.gu-page {
  color: #374151;
  font-size: 0.95rem;
}

.gu-page-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.gu-page-header h1 {
  font-size: 1.7rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  letter-spacing: -0.01em;
}

.gu-page-header h1 small {
  font-size: 1rem;
  font-weight: 400;
  color: #6b7280;
  margin-left: 6px;
}

.gu-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.gu-toolbar-note {
  color: #6b7280;
  font-size: 0.85rem;
}

.gu-owner-label {
  margin-left: auto;
  font-size: 0.78rem;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 10px;
  border-radius: 999px;
}

.gu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  background: #ffffff;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gu-btn-xs {
  padding: 4px 10px;
  font-size: 0.8rem;
}

.gu-btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.gu-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.gu-btn-default {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

.gu-btn-default:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}

.gu-btn-danger {
  background: #ffffff;
  border-color: #fca5a5;
  color: #dc2626;
}

.gu-btn-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
}

.gu-active {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #111827;
}

.gu-panel {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  margin-bottom: 20px;
  overflow: hidden;
}

.gu-create-panel {
  max-width: 680px;
}

.gu-panel-heading {
  background: #f1f5f9;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
}

.gu-panel-info .gu-panel-heading {
  background: #dbeafe;
  border-bottom-color: #bfdbfe;
  color: #1e3a8a;
}

.gu-panel-warning .gu-panel-heading {
  background: #fef3c7;
  border-bottom-color: #fde68a;
  color: #92400e;
}

.gu-panel-danger .gu-panel-heading {
  background: #fee2e2;
  border-bottom-color: #fecaca;
  color: #991b1b;
}

.gu-panel-body {
  padding: 14px;
}

.gu-panel-body p {
  margin: 0 0 8px;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.7;
}

.gu-panel-body p:last-child {
  margin-bottom: 0;
}

.gu-form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.gu-form-row label {
  width: 180px;
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: #374151;
}

.gu-input,
.gu-file {
  flex: 1;
  min-width: 220px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 0.9rem;
}

.gu-input:focus,
.gu-file:focus {
  outline: 2px solid #bfdbfe;
  border-color: #60a5fa;
}

.gu-help {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0 0 12px;
}

.gu-alert {
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.gu-alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.gu-alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.gu-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow-x: auto;
  background: #ffffff;
}

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

.gu-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
  font-size: 0.82rem;
}

.gu-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
  vertical-align: middle;
}

.gu-table tbody tr:nth-child(even) {
  background: #fcfcfd;
}

.gu-table tbody tr:hover {
  background: #f8fafc;
}

.gu-table tbody tr:last-child td {
  border-bottom: none;
}

.gu-table a {
  color: #1d4ed8;
  text-decoration: none;
}

.gu-table a:hover {
  text-decoration: underline;
}

/* 表の中のボタンはリンク色ではなくボタン色を優先 */
.gu-table a.gu-btn {
  text-decoration: none;
}

.gu-table a.gu-btn-primary {
  color: #ffffff;
}

.gu-table a.gu-btn-danger {
  color: #dc2626;
}

.gu-table a.gu-btn-default {
  color: #374151;
}

.gu-col-file {
  min-width: 240px;
  word-break: break-all;
}

.gu-col-actions {
  white-space: nowrap;
}

.gu-col-actions .gu-btn + .gu-btn {
  margin-left: 6px;
}

.gu-empty {
  text-align: center;
  color: #6b7280;
  padding: 28px 12px !important;
  font-size: 0.9rem;
}

.gu-lock {
  font-size: 0.85em;
}

.gu-lock svg {
  width: 13px;
  height: 13px;
  display: inline-block;
  vertical-align: -2px;
  color: #6b7280;
}

.gu-lock {
  margin-right: 6px;
}

.gu-description {
  white-space: pre-wrap;
  word-break: break-word;
}

.gu-muted {
  color: #6b7280;
  font-size: 0.88rem;
}

.gu-desc-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eef2f7;
}

.gu-desc-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.gu-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.7;
  resize: vertical;
}

.gu-textarea:focus {
  outline: 2px solid #bfdbfe;
  border-color: #60a5fa;
}

.gu-form-row .gu-textarea {
  flex: 1;
  min-width: 220px;
}

.gu-desc-form .gu-btn {
  margin-top: 10px;
}

.gu-room-delete {
  margin-top: 8px;
}

.gu-count {
  color: #6b7280;
  font-size: 0.82rem;
  margin: 8px 0 24px;
}

.gu-actions {
  margin: 20px 0 28px;
}

.gu-danger-text {
  color: #b91c1c;
  font-weight: 600;
}

.gu-delete-target {
  font-size: 0.9rem;
}

.gu-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}

.gu-h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 10px;
}

.gu-table.gu-stats {
  font-size: 0.85rem;
  border: 1px solid #e5e7eb;
}

.gu-stats caption {
  caption-side: top;
  text-align: left;
  color: #6b7280;
  font-size: 0.8rem;
  padding: 0 0 6px;
}

.gu-stats th {
  width: 45%;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.gu-stats td {
  border-bottom: 1px solid #f1f5f9;
}

@media (max-width: 760px) {
  .up-hero {
    padding: 64px 20px 56px;
  }

  .up-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .up-about {
    padding: 56px 20px;
  }

  .up-about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .up-br {
    display: none;
  }

  .gu-row {
    grid-template-columns: 1fr;
  }

  .gu-col-file {
    min-width: 160px;
  }

  .gu-form-row label {
    width: 100%;
  }

  .gu-page-header h1 {
    font-size: 1.4rem;
  }

  .gu-owner-label {
    margin-left: 0;
  }
}
