/*
Theme Name: Jujutsupedia
Theme URI: https://jujutsupedia.com
Author: Jujutsupedia
Author URI: https://jujutsupedia.com
Description: YouTube柔術教則動画を体系化した辞書サイト用テーマ
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jujutsupedia
*/

/* ========================================
   CSS Variables
   ======================================== */
:root {
  --color-primary: #1a237e;
  --color-primary-light: #3949ab;
  --color-primary-dark: #0d1452;
  --color-accent: #2962ff;
  --color-accent-light: #448aff;
  --color-bg: #ffffff;
  --color-bg-secondary: #f7f8fa;
  --color-bg-tertiary: #eef0f4;
  --color-bg-card: #ffffff;
  --color-text: #1a1a2e;
  --color-text-secondary: #5a5a72;
  --color-text-muted: #8e8ea0;
  --color-border: #d4d6e0;
  --color-border-light: #e8eaf0;
  --color-success: #2e7d32;
  --font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1200px;
  --header-height: 60px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --radius-full: 50px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-bg-secondary);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--color-accent);
}

ul,
ol {
  list-style: none;
}

/* ========================================
   Layout
   ======================================== */
.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Header
   ======================================== */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  gap: 16px;
}

.site-branding a {
  display: flex;
  align-items: center;
}

.site-logo {
  height: 36px;
  width: auto;
  display: block;
}

.site-branding .text-logo {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  white-space: nowrap;
}



/* Header Search Toggle */
.header-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  background: var(--color-bg);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.header-search-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(26, 35, 126, 0.04);
}

.header-search-toggle svg {
  width: 16px;
  height: 16px;
}

/* Search Panel (Header Dropdown) */
.search-panel {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-md);
  z-index: 99;
  padding: 20px 0;
}

.search-panel.is-open {
  display: block;
}

.search-panel-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.search-panel-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.search-panel-field {
  flex: 1;
  min-width: 200px;
}

.search-panel-field label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.search-panel-field input[type="search"],
.search-panel-field select {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--color-text);
  background: var(--color-bg);
  outline: none;
  transition: border-color 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.search-panel-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a5a72' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.search-panel-field input:focus,
.search-panel-field select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.1);
}

.search-panel-submit {
  height: 40px;
  padding: 0 24px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.search-panel-submit:hover {
  background: var(--color-primary-light);
}

/* Mobile Menu Toggle (hidden - no longer used) */
.menu-toggle {
  display: none;
}

/* ========================================
   Hero Section (Front Page)
   ======================================== */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  padding: 56px 24px;
  text-align: center;
  margin: -28px -24px 0;
  width: calc(100% + 48px);
}

.hero-section h1 {
  font-size: 1.875rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.hero-section p {
  font-size: 0.9375rem;
  opacity: 0.8;
  margin-bottom: 28px;
  font-weight: 400;
}

/* Hero Advanced Search */
.hero-search-container {
  max-width: 680px;
  margin: 0 auto;
}

.hero-search-keyword {
  display: flex;
  background: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  height: 48px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  margin-bottom: 12px;
}

.hero-search-keyword input[type="search"] {
  flex: 1;
  border: none;
  padding: 0 20px;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  color: var(--color-text);
  outline: none;
  background: transparent;
  min-width: 0;
}

.hero-search-keyword input[type="search"]::placeholder {
  color: var(--color-text-muted);
}

.hero-search-keyword button[type="submit"] {
  flex-shrink: 0;
  background: var(--color-accent);
  color: #ffffff;
  border: none;
  padding: 0 24px;
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1;
  min-width: 60px;
  text-align: center;
}

.hero-search-keyword button[type="submit"]:hover {
  background: var(--color-accent-light);
}

.hero-search-categories {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.hero-search-categories select {
  height: 38px;
  padding: 0 28px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  min-width: 130px;
  transition: all 0.15s ease;
}

.hero-search-categories select:hover,
.hero-search-categories select:focus {
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.18);
}

.hero-search-categories select option {
  color: var(--color-text);
  background: var(--color-bg);
}

/* ========================================
   Section Titles
   ======================================== */
.section-title {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header .view-all {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
}

.section-header .view-all:hover {
  color: var(--color-primary);
}

.home-section {
  margin-top: 36px;
  margin-bottom: 20px;
}

/* ========================================
   Video Card Grid
   ======================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.video-card {
  display: flex;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

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

.video-card-thumbnail {
  position: relative;
  width: 220px;
  min-height: 124px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

.video-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.video-card:hover .video-card-thumbnail img {
  transform: scale(1.03);
}

.video-card-thumbnail .no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color-text-muted);
  font-size: 0.6875rem;
}

.video-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.video-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-title a {
  color: var(--color-text);
}

.video-card-title a:hover {
  color: var(--color-primary);
}

.video-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.video-card-category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(26, 35, 126, 0.06);
  padding: 2px 10px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.01em;
}

.video-card-channel {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

.video-card-channel svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

/* ========================================
   Category Section (Front Page - Full Hierarchy)
   ======================================== */
.category-section {
  margin-bottom: 28px;
}

.category-section-title {
  font-size: 1.0625rem;
  font-weight: 800;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.category-section-title a {
  color: var(--color-text);
}

.category-section-title a:hover {
  color: var(--color-primary);
}

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

.category-card {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--color-bg-card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

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

.category-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.category-card-title a {
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.category-card-title a:hover {
  color: var(--color-primary);
}

.category-card-title .count {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.subcategory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subcategory-list a {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.subcategory-list a:hover {
  color: var(--color-primary);
  background: rgba(26, 35, 126, 0.06);
  border-color: rgba(26, 35, 126, 0.12);
}

.subcategory-list .count {
  font-size: 0.625rem;
  color: var(--color-text-muted);
  margin-left: 1px;
}

/* ========================================
   Instructor Tags (Front Page & Shared)
   ======================================== */
.instructor-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.instructor-tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #00897b;
  background: rgba(0, 137, 123, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(0, 137, 123, 0.2);
  transition: all 0.15s ease;
}

.instructor-tag:hover {
  color: #ffffff;
  background: #00897b;
  border-color: #00897b;
}

.instructor-tag .count {
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgba(0, 137, 123, 0.6);
  margin-left: 2px;
}

.instructor-tag:hover .count {
  color: rgba(255, 255, 255, 0.8);
}

/* Instructor tags in single video page */
.single-video-instructors {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.single-video-instructors .instructor-tag {
  font-size: 0.8125rem;
  padding: 4px 12px;
}

/* Instructor tags in video card */
.video-card-instructor {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #00897b;
  background: rgba(0, 137, 123, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.01em;
  transition: all 0.15s ease;
}

.video-card-instructor:hover {
  background: rgba(0, 137, 123, 0.15);
}

/* ========================================
   Taxonomy Archive
   ======================================== */
.archive-header {
  margin-bottom: 28px;
}

.archive-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.archive-description {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.child-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.child-categories a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  transition: all 0.15s ease;
}

.child-categories a:hover,
.child-categories a.current {
  color: #ffffff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* ========================================
   Single Video
   ======================================== */
.single-video-container {
  max-width: 860px;
  margin: 0 auto;
}

.video-player-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 24px;
  background: #000;
  box-shadow: var(--shadow-lg);
}

.video-player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.single-video-title {
  font-size: 1.375rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.5;
}

.single-video-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.single-video-channel {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.single-video-channel svg {
  opacity: 0.5;
}

.single-video-categories {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.single-video-categories a {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(26, 35, 126, 0.06);
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  transition: all 0.15s ease;
}

.single-video-categories a:hover {
  background: rgba(26, 35, 126, 0.12);
}

.single-video-content {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text-secondary);
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-border-light);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  padding: 10px 16px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
}

.breadcrumb a {
  color: var(--color-text-secondary);
  font-weight: 500;
}

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

.breadcrumb .separator {
  margin: 0 2px;
  color: var(--color-text-muted);
}

/* Related Videos */
.related-videos {
  margin-top: 40px;
}

/* ========================================
   Search Results
   ======================================== */
.search-header {
  margin-bottom: 24px;
}

.search-header h1 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.search-header .result-count {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.search-filters-active {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.search-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
  background: rgba(26, 35, 126, 0.06);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border-light);
}

.no-results h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.no-results p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.no-results .search-form-inline {
  max-width: 400px;
  margin: 0 auto;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 36px;
  padding-top: 20px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.pagination a {
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  transition: all 0.15s ease;
}

.pagination a:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.pagination .current {
  background: var(--color-primary);
  color: #ffffff;
  border: 1px solid var(--color-primary);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
  padding: 28px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--color-primary);
}

/* ========================================
   404 Page
   ======================================== */
.error-404 {
  text-align: center;
  padding: 80px 20px;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border-light);
}

.error-404 h1 {
  font-size: 4rem;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1;
}

.error-404 p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.error-404 .btn-home {
  display: inline-block;
  padding: 10px 28px;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  transition: background 0.15s ease;
}

.error-404 .btn-home:hover {
  background: var(--color-primary-light);
  color: #ffffff;
}

/* ========================================
   WP Admin Bar Offset
   ======================================== */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/* ========================================
   Responsive: Tablet (768px)
   ======================================== */
@media screen and (max-width: 768px) {
  .site-branding {
    flex: 1;
    min-width: 0;
  }

  .site-logo {
    height: 30px;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .video-card-thumbnail {
    width: 160px;
    min-height: 90px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .hero-section {
    padding: 40px 20px;
  }

  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-search-categories {
    flex-wrap: wrap;
  }

  .hero-search-categories select {
    min-width: 100px;
    flex: 1;
  }

  .search-panel-form {
    flex-direction: column;
  }

  .search-panel-field {
    min-width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .single-video-title {
    font-size: 1.125rem;
  }
}

/* ========================================
   Responsive: Mobile (480px)
   ======================================== */
@media screen and (max-width: 480px) {
  .site-main {
    padding: 20px 16px 40px;
  }

  .header-inner {
    padding: 0 16px;
  }

  .hero-section {
    padding: 32px 16px;
    margin: -20px -16px 0;
    width: calc(100% + 32px);
  }

  .hero-section h1 {
    font-size: 1.25rem;
  }

  .hero-search-keyword {
    height: 44px;
  }

  .hero-search-categories select {
    font-size: 0.75rem;
    height: 34px;
  }

  .video-card {
    flex-direction: column;
  }

  .video-card-thumbnail {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    padding: 16px;
  }

  .archive-header h1 {
    font-size: 1.25rem;
  }

  .breadcrumb {
    padding: 8px 12px;
    font-size: 0.6875rem;
  }

  .container {
    padding: 0 16px;
  }
}

/* ========================================
   Prevent iOS Safari Auto-Zoom on Focus
   ======================================== */
@media screen and (max-width: 768px) {

  input[type="search"],
  input[type="text"],
  input[type="email"],
  input[type="url"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}