@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
  --brown: #5B3A29;
  --brown-light: #8B6914;
  --green: #2D8C3C;
  --green-light: #d4edda;
  --orange: #E85B2A;
  --cream: #FFF8F0;
  --text: #333;
  --text-light: #666;
  --border: #e5e5e5;
  --white: #fff;
  --radius: 12px;
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown); text-decoration: none; }

/* ========== Header ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.08); }

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding .3s;
}
.site-header.scrolled .header-inner { padding: .6rem 2rem; }

.header-logo {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--brown);
  letter-spacing: .05em;
  line-height: 1.4;
  transition: font-size .3s;
}
.site-header.scrolled .header-logo { font-size: 1rem; }

.header-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: .85rem;
  color: var(--text-light);
}
.header-info a { color: var(--text); font-weight: 700; }
.header-info i { color: var(--green); margin-right: .3rem; }

.status-badge {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
}
.status-open { background: var(--green-light); color: #065f46; }
.status-closed { background: #fee2e2; color: #991b1b; }

/* ========== Section Common ========== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--brown-light);
  margin-bottom: .75rem;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--text);
}

.section-desc {
  font-size: .95rem;
  color: var(--text-light);
  line-height: 1.9;
}

/* ========== Hero / Catchcopy ========== */
.hero {
  padding-top: 100px;
  background: var(--cream);
}
.hero .section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.hero .section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.5;
}
.hero-sub {
  font-size: .9rem;
  letter-spacing: .15em;
  color: var(--brown-light);
  margin-top: 1rem;
}

/* ========== Live Camera ========== */
.live-camera { background: var(--white); }
.live-camera .section { padding-top: 2rem; }

.camera-container {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.camera-wrapper {
  width: 100%;
  max-width: 800px;
}

.camera-notice {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--cream);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.camera-notice-icon {
  font-size: 1.5rem;
  color: var(--orange);
  flex-shrink: 0;
}
.camera-notice p {
  font-size: .95rem;
  line-height: 1.7;
  margin: 0;
}

/* Camera Highlight Heading */
.camera-highlight {
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}
.camera-highlight-inner {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.camera-highlight-deco {
  font-size: 2rem;
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
  -webkit-text-stroke: 2px var(--orange);
}
.camera-highlight-text {
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 900;
  color: var(--brown);
  letter-spacing: .05em;
}

/* Camera Bottom Message - Minimal Text */
.camera-bottom-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: .5rem 0;
}
.camera-bottom-msg p {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.6;
  margin: 0;
  text-align: center;
}
.camera-bottom-msg .run-icon {
  font-size: 2rem;
  color: var(--orange);
  flex-shrink: 0;
}

.camera-main {
  position: relative;
  background: #e8e8e8;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.camera-main img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity .3s;
}
.camera-main img.loading { opacity: .5; }

.camera-closed-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 1);
  color: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  z-index: 5;
  border-radius: var(--radius);
}
.camera-closed-overlay.active { display: flex; }

.channel-label {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(0,0,0,.6);
  color: #fff;
  padding: .4rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  border-radius: 4px;
}

.camera-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
}

.camera-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}

.camera-group-label {
  font-size: .9rem;
  font-weight: 700;
  color: var(--brown);
}

.camera-group-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.ch-btn {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.ch-btn:hover { border-color: var(--brown); color: var(--brown); }
.ch-btn.active {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--white);
}

.ch-arrow {
  width: 36px;
  height: 36px;
  border: 2px solid var(--text);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  transition: all .2s;
}
.ch-arrow:hover { background: var(--text); color: var(--white); }

/* Camera controls continued */

/* Live Badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--green);
  color: var(--white);
  padding: .5rem 1.25rem;
  border-radius: 20px;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.live-badge i { font-size: .9rem; }

/* Pilot Project Card */
.store-switch {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background: var(--cream);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--brown);
  font-weight: 700;
  font-size: .95rem;
  transition: all .3s;
}
.store-switch:hover {
  background: var(--brown);
  color: var(--white);
}
.store-switch i { font-size: 1.1rem; }

.pilot-card {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.pilot-card-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: .75rem;
}
.pilot-card-header i { color: var(--green); }
.pilot-card-text {
  font-size: .9rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 1rem;
}
.pilot-card-period {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
}
.pilot-card-period i { color: var(--brown-light); }

.pilot-card .survey-btn { margin-top: .5rem; }

.camera-update-info {
  margin-top: .75rem;
  font-size: .8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.camera-update-info i { color: var(--green); }

.camera-notice {
  margin-top: .4rem;
  margin-bottom: .4rem;
  font-size: .95rem;
  color: #d32f2f;
  text-align: center;
}

/* ========== Store Info ========== */
.store-info {
  background: url('assets/img/profile_background.jpg') center/cover no-repeat;
  position: relative;
}
.store-info::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
}
.store-info .section { position: relative; z-index: 1; }
.store-info .section-label { color: #d4a853; }
.store-info .section-title { color: var(--white); }

.info-table {
  width: 100%;
  margin-top: 2rem;
  border-collapse: collapse;
}
.info-table th,
.info-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--white);
  text-align: left;
  font-size: .95rem;
  color: var(--white);
}
.info-table th {
  width: 140px;
  font-weight: 700;
  white-space: nowrap;
}
.info-table a { color: var(--white); text-decoration: underline; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-top: 2rem;
  padding: 0;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  transition: gap .3s;
}
.link-btn:hover { gap: 1rem; }

.link-btn .arrow {
  width: 44px;
  height: 44px;
  border: 2px solid var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s;
}
.link-btn:hover .arrow {
  background: var(--text);
  color: var(--white);
}

/* White variant for dark backgrounds */
.store-info .link-btn { color: var(--white); }
.store-info .link-btn .arrow { border-color: var(--white); color: var(--white); }
.store-info .link-btn:hover .arrow { background: var(--white); color: var(--brown); }

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ========== Access / Map ========== */
.access { background: var(--white); }

.map-container {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 400px;
}
.map-container #map { width: 100%; height: 100%; }

.map-actions {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

/* ========== Footer ========== */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.6);
  padding: 3rem 2rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  transition: color .2s;
}
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: .8rem; }

.footer-supported {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}
.footer-yanmar-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .header-inner { padding: .75rem 1rem; }
  .header-info { display: none; }
  .header-mobile-status { display: block; }

  .section { padding: 3rem 1.25rem; }
  .hero .section { padding-top: 2.5rem; padding-bottom: 2.5rem; }

  .camera-container { justify-content: center; }

  .info-table th { width: 100px; font-size: .85rem; }
  .info-table td { font-size: .85rem; }

  .map-container { height: 300px; }

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

@media (max-width: 480px) {
  .ch-btn { padding: 6px 12px; font-size: .75rem; }
  .ch-arrow { width: 32px; height: 32px; }
}

/* ========== Camera Modal ========== */
.camera-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.camera-modal.active { display: flex; }
.camera-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.85);
}
.camera-modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-modal-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  object-fit: contain;
  user-select: none;
}
.camera-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
.camera-modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0,0,0,.4);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-modal-prev { left: -3.5rem; }
.camera-modal-next { right: -3.5rem; }
.camera-modal-label {
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .camera-modal-prev { left: .5rem; }
  .camera-modal-next { right: .5rem; }
  .camera-modal-close { top: -2rem; right: .5rem; }
}

/* ========== Utility ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
