@charset "UTF-8";

/* ==========================================================================
   Design Tokens (Based on Newmo / DESIGN-new.md)
   ========================================================================== */
:root {
  /* Colors */
  --color-primary: #00B031;    /* Newmo Green */
  --color-primary-dark: #008a26;
  --color-text-main: #1A1A1A;
  --color-surface: #FAF9FE;    /* From DESIGN-guideline.md */
  --color-bg-secondary: #F5F7F9; /* From DESIGN-new.md */
  --color-white: #FFFFFF;
  --color-border: rgba(26, 26, 26, 0.1);
  --color-text-sub: rgba(26, 26, 26, 0.6);
  --color-border-light: rgba(26, 26, 26, 0.05);

  /* Organization Colors */
  --color-jpba: #4CAF50;
  --color-japa: #2196F3;
  --color-jpa: #f44336;
  --color-other: #9e9e9e;

  /* Typography */
  --font-family: "Lexend", "Manrope", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  
  /* Spacing */
  --space-unit: 8px;
  --space-1: calc(var(--space-unit) * 1);
  --space-2: calc(var(--space-unit) * 2);
  --space-3: calc(var(--space-unit) * 3);
  --space-4: calc(var(--space-unit) * 4);
  --space-6: calc(var(--space-unit) * 6);
  --space-8: calc(var(--space-unit) * 8);

  /* Radius */
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-pill: 9999px;

  /* Shadow */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

  /* Icon size */
  --icon-size: 24px;
}

/* ==========================================================================
   Hero Slider
   ========================================================================== */
.c-hero {
  padding: 0 !important;
  background: none !important;
}

.c-slider {
  position: relative;
  width: 100%;
  height: 400px; /* 縦幅を抑える */
  overflow: hidden;
  background-color: var(--color-bg-secondary);
}

@media (max-width: 768px) {
  .c-slider {
    height: 220px;
  }
}

.c-slider__track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.c-slider__item {
  flex: 0 0 100%;
  position: relative;
  height: 100%;
  display: block;
  overflow: hidden;
}

.c-slider__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.c-slider__item:hover .c-slider__img {
  transform: scale(1.05);
}

.c-slider__content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 60%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--space-8);
  z-index: 2;
}

@media (max-width: 768px) {
  .c-slider__content {
    padding: 0 var(--space-4);
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    justify-content: flex-end;
    padding-bottom: var(--space-8);
  }
}

.c-slider__title {
  font-size: 32px;
  margin-bottom: var(--space-2);
  color: white;
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .c-slider__title {
    font-size: 18px;
  }
}

.c-slider__text {
  font-size: 18px;
  max-width: 500px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .c-slider__text {
    font-size: 14px;
  }
}

.c-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.3);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.c-slider__nav:hover {
  background: rgba(255,255,255,0.5);
}

.c-slider__nav--prev { left: 20px; }
.c-slider__nav--next { right: 20px; }

@media (max-width: 768px) {
  .c-slider__nav { display: none; }
}

.c-slider__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.c-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  padding: 0;
  cursor: pointer;
}

.c-slider__dot.is-active {
  background: white;
  transform: scale(1.2);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--color-text-main);
  background-color: var(--color-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

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

/* ==========================================================================
   Layout
   ========================================================================== */
.l-container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.l-section {
  padding: var(--space-8) 0;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.c-header {
  background-color: var(--color-white);
  height: 72px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.c-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.c-header__logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-header__nav {
  display: flex;
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .c-header__nav {
    display: none; /* Mobile menu handled by bottom nav or burger */
  }
}

.c-header__nav-link {
  font-size: 14px;
  font-weight: 600;
}
.c-header__nav-link.active {
  color: var(--color-primary);
}

/* Bottom Navigation (Mobile) */
.c-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-white);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 100;
  padding: 8px 0;
}

@media (max-width: 768px) {
  .c-bottom-nav {
    display: flex;
    justify-content: space-around;
  }
}

.c-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  gap: 2px;
  color: var(--color-text-sub);
  flex: 1;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.c-bottom-nav__item .material-symbols-outlined {
  font-size: var(--icon-size);
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.c-bottom-nav__item--active {
  color: var(--color-primary);
}

.c-bottom-nav__item--active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Hero */
.c-hero {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-8) 0;
  border-radius: 0 0 var(--radius-l) var(--radius-l);
  text-align: center;
}

.c-hero__title {
  font-size: 32px;
  margin-bottom: var(--space-1);
}

.c-hero__tagline {
  font-size: 16px;
  opacity: 0.9;
}

/* Card */
.c-card {
  background: var(--color-white);
  border-radius: var(--radius-l);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.c-card--hoverable:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.c-card__image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-m);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-sub);
}

.c-card__title {
  font-size: 16px;
  margin-bottom: var(--space-1);
}

.c-card__text {
  font-size: 14px;
  color: var(--color-text-sub);
  margin-bottom: var(--space-2);
}

.c-card__footer {
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
}

/* Button */
.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.c-btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.c-btn--primary:hover {
  background-color: var(--color-primary-dark);
}

.c-btn--outline {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

/* Grid */
.l-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

/* Horizontal Scroll (for mobile) */
.c-scroll-row {
  display: flex;
  overflow-x: auto;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  scrollbar-width: none;
}

.c-scroll-row::-webkit-scrollbar {
  display: none;
}

.c-scroll-row > * {
  flex: 0 0 260px;
}

/* ==========================================================================
   Common Components
   ========================================================================== */

/* Page Header */
.c-page-header {
  background-color: var(--color-primary);
  color: white;
  padding: var(--space-6) 0;
}

.c-page-header--none {
  background-color: transparent;
  color: var(--color-text-main);
  padding: var(--space-4) 0 0;
}

.c-page-header__title {
  font-family: "Lexend", sans-serif;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.c-page-header__subtitle {
  font-size: 16px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .c-page-header {
    padding: var(--space-4) 0;
  }
  .c-page-header__title {
    font-size: 24px;
  }
}

/* Rule Page Specific */
.c-rule-section {
  background-color: var(--color-white);
  border-radius: var(--radius-l);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.c-rule-title {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 8px;
  margin-bottom: 16px;
  font-size: 20px;
}
.c-rule-item {
  margin-bottom: 24px;
}
.c-rule-item h3 {
  font-size: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.c-rule-item h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background-color: var(--color-primary);
  border-radius: 2px;
}

/* Rule Changes Page Specific */
.c-diff-card {
  background-color: var(--color-white);
  border-radius: var(--radius-l);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.c-diff-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
.c-diff-box {
  padding: 16px;
  border-radius: var(--radius-m);
}
.c-diff-box--old {
  background-color: #fff5f5;
  border: 1px solid #feb2b2;
  text-decoration: line-through;
  color: #c53030;
}
.c-diff-box--new {
  background-color: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #276749;
  font-weight: 700;
}
.c-diff-label {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
  display: block;
}
@media (max-width: 768px) {
  .c-diff-item {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Article & Details
   ========================================================================== */
.c-article {
  background-color: var(--color-white);
  border-radius: var(--radius-l);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.c-article__meta {
  color: var(--color-text-sub);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
}

.c-article__content {
  line-height: 2.0;
  font-size: 17px;
}

.c-article__content h2 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 20px;
  border-left: 4px solid var(--color-primary);
  padding-left: 12px;
}

/* Result Table */
.c-result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.c-result-table th, .c-result-table td {
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.c-result-table th {
  background-color: var(--color-bg-secondary);
  font-weight: 700;
  width: 30%;
}

@media (max-width: 768px) {
  .c-article {
    padding: var(--space-4);
  }
  .c-article__content {
    font-size: 16px;
    line-height: 1.8;
  }
  .c-article__content h2 {
    font-size: 18px;
    margin-top: 24px;
  }
}

/* Detail Page Grid */
.u-grid-detail {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-6);
  align-items: start;
}

@media (max-width: 940px) {
  .u-grid-detail {
    grid-template-columns: 1fr;
  }
}

.c-detail-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.c-detail-info__item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.c-detail-info__item .material-symbols-outlined {
  color: var(--color-primary);
  font-size: 24px;
}

.u-w-full {
  width: 100% !important;
}

.u-font-bold {
  font-weight: 700;
}

.u-gap-2 {
  gap: var(--space-2);
}

.u-flex-column {
  display: flex;
  flex-direction: column;
}

.u-fs-18 { font-size: 18px; }
.u-fs-20 { font-size: 20px; }

.u-py-12 { padding-top: calc(var(--space-unit) * 12); padding-bottom: calc(var(--space-unit) * 12); }

/* Shop Detail Page */
.c-shop-hero {
  height: 300px;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-l);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-sub);
  margin-bottom: var(--space-6);
}

.c-shop-info-card {
  background-color: var(--color-white);
  border-radius: var(--radius-l);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.c-shop-nav {
  display: flex;
  gap: 1px;
  background-color: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.c-shop-nav__item {
  flex: 1;
  background-color: var(--color-white);
  padding: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.c-shop-nav__item.is-active {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.c-info-table {
  width: 100%;
  border-collapse: collapse;
}

.c-info-table th {
  width: 120px;
  text-align: left;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-sub);
  font-weight: 600;
}

.c-info-table td {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .c-shop-hero {
    height: 200px;
  }
  .c-shop-info-card {
    padding: var(--space-4);
  }
  .c-info-table th {
    width: 100px;
    font-size: 14px;
  }
}

.c-detail-side {
  width: 100%;
}

.c-detail-main {
  width: 100%;
}
/* Slider Specific Utilities (for index.html) */
.c-hero__section {
  background-color: var(--color-primary);
  color: white;
  border-radius: var(--radius-l);
  text-align: center;
  width: 100%;
}

.c-hero__section h2 {
  color: white;
}

.c-hero__btn {
  background: white;
  color: var(--color-primary);
}

/* Calendar Specific Utilities */
.u-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.u-flex-gap-2 {
  display: flex;
  gap: var(--space-2);
}

.u-btn-narrow {
  padding: 4px 12px;
}

.u-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-4);
}

/* Gallery */
.c-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.c-gallery__item {
  border-radius: var(--radius-m);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  box-shadow: var(--shadow-sm);
}

.c-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.c-gallery__item:hover .c-gallery__img {
  transform: scale(1.05);
}

.c-article__main-img {
  width: 100%;
  border-radius: var(--radius-l);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Footer */
.c-footer {
  background-color: var(--color-white);
  padding: var(--space-8) 0 var(--space-6);
  margin-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-sub);
}

.c-footer__inner {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-8);
  text-align: left;
}

.c-footer__info-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.c-footer__info-text {
  font-size: 14px;
  line-height: 1.6;
}

.c-footer__sitemap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.c-footer__sitemap-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: var(--space-3);
  display: block;
}

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

.c-footer__sitemap-item {
  margin-bottom: var(--space-2);
}

.c-footer__sitemap-link {
  font-size: 13px;
  color: var(--color-text-sub);
  transition: color 0.2s;
}

.c-footer__sitemap-link:hover {
  color: var(--color-primary);
}

.c-footer__copyright {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-bg-secondary);
  text-align: center;
  font-size: 12px;
}

@media (max-width: 768px) {
  .c-footer {
    padding-bottom: 100px; /* Space for bottom nav */
  }
  .c-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .c-footer__sitemap {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* More Menu Overlay */
.c-more-menu {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background: var(--color-white);
  z-index: 1000;
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
  transition: bottom 0.3s ease-out;
  padding: var(--space-6) var(--space-4) 100px;
}

.c-more-menu.is-active {
  bottom: 0;
}

.c-more-menu__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}

.c-more-menu__overlay.is-active {
  display: block;
}

.c-more-menu__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-4);
  text-align: center;
}

.c-more-menu__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.c-more-menu__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: var(--space-3);
  border-radius: var(--radius-m);
  background: var(--color-bg-secondary);
  transition: background 0.2s;
}

.c-more-menu__item:active {
  background: #e0e0e0;
}

.c-more-menu__icon {
  font-size: 24px;
  color: var(--color-primary);
}

.c-more-menu__label {
  font-size: 12px;
  font-weight: 600;
}

/* Utilities */
.u-mb-0 { margin-bottom: 0; }
.u-mb-1 { margin-bottom: var(--space-1); }
.u-mb-2 { margin-bottom: var(--space-2); }
.u-mb-4 { margin-bottom: var(--space-4); }
.u-mb-6 { margin-bottom: var(--space-6); }
.u-mb-8 { margin-bottom: var(--space-8); }
.u-mt-1 { margin-top: var(--space-1); }
.u-mt-4 { margin-top: var(--space-4); }
.u-text-center { text-align: center; }
.u-color-sub { color: var(--color-text-sub); }
.u-font-lexend { font-family: "Lexend", sans-serif; }
.u-opacity-9 { opacity: 0.9; }
.u-fs-14 { font-size: 14px; }
.u-fs-16 { font-size: 16px; }

.u-bg-secondary { background-color: var(--color-bg-secondary); }
.u-flex-between { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-end; 
}

.u-link-primary {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

.u-date-label {
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.u-result-label {
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 700;
}

.u-btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

.u-border-bottom {
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 8px;
  display: inline-block;
}

.u-grid-about {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}
