/* ===================================
   ThaiLife ポータル — Design System
   =================================== */

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

html {
  scroll-behavior: smooth;
}

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

/* --- CSS Variables --- */
:root {
  /* Dark theme (default) */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-card-hover: rgba(24, 34, 56, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  --bg-input: rgba(255, 255, 255, 0.05);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a0e1a;

  --accent-gold: #d4a843;
  --accent-gold-light: #f0d078;
  --accent-gold-dark: #b08a2e;
  --accent-teal: #14b8a6;
  --accent-blue: #3b82f6;
  --accent-red: #ef4444;
  --accent-orange: #f97316;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-green: #22c55e;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(212, 168, 67, 0.3);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(212, 168, 67, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-ja: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  --font-en: 'Inter', sans-serif;

  --header-height: 64px;
  --infobar-height: 40px;
  --max-width: 1400px;

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(248, 250, 252, 1);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-glass-hover: rgba(0, 0, 0, 0.04);
  --bg-input: rgba(0, 0, 0, 0.04);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-gold: #b08a2e;
  --accent-gold-light: #d4a843;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(176, 138, 46, 0.3);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(176, 138, 46, 0.1);
}

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

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

body {
  font-family: var(--font-ja);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Background gradient decoration */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse, rgba(212, 168, 67, 0.04) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  right: -20%;
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(20, 184, 166, 0.03) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  border: none;
  outline: none;
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.85);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.header__logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}

.header__logo-text {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header__nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.header__nav-link:hover,
.header__nav-link.active {
  color: var(--accent-gold);
  background: var(--bg-glass-hover);
}

.header__nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 1px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__search {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  gap: 8px;
  transition: border-color var(--transition-fast);
  width: 200px;
}

.header__search:focus-within {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow);
}

.header__search input {
  background: transparent;
  color: var(--text-primary);
  font-size: 0.875rem;
  width: 100%;
}

.header__search input::placeholder {
  color: var(--text-muted);
}

.header__search-icon {
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 18px;
}

.btn-icon:hover {
  background: var(--bg-glass-hover);
  color: var(--accent-gold);
}

/* Mobile menu toggle */
.header__mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text-secondary);
}

/* --- Info Bar --- */
.infobar {
  background: linear-gradient(90deg, rgba(212, 168, 67, 0.08), rgba(20, 184, 166, 0.05));
  border-bottom: 1px solid var(--border-color);
  height: var(--infobar-height);
  overflow: hidden;
}

.infobar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.infobar__item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.infobar__item-icon {
  font-size: 14px;
}

.infobar__item-value {
  color: var(--accent-gold);
  font-weight: 600;
  font-family: var(--font-en);
}

.infobar__alert {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  animation: pulse-alert 2s infinite;
}

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

/* --- Hero Section --- */
.hero {
  padding: 24px 0;
}

.hero__carousel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: 360px;
}

.hero__main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.hero__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.hero__main:hover .hero__main-img {
  transform: scale(1.05);
}

.hero__main-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.hero__main-category {
  display: inline-block;
  background: var(--accent-gold);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero__main-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 8px;
}

.hero__main-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  gap: 12px;
}

.hero__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.hero__side-item {
  flex: 1;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.hero__side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.hero__side-item:hover img {
  transform: scale(1.05);
}

.hero__side-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.hero__side-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.hero__side-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

/* --- Section Headers --- */
.section {
  padding: 32px 0;
}

.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section__title-icon {
  font-size: 20px;
}

.section__title-bar {
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--accent-gold), var(--accent-teal));
  border-radius: 2px;
}

.section__more {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast);
}

.section__more:hover {
  color: var(--accent-gold);
}

/* --- Main Layout --- */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  margin-top: 32px;
}

.main-content {
  min-width: 0;
}

/* --- News Feed --- */
.news-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.news-tab {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.news-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-glass);
}

.news-tab.active {
  color: var(--accent-gold);
  background: rgba(212, 168, 67, 0.1);
  border-color: rgba(212, 168, 67, 0.2);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
}

.news-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-card__img {
  width: 180px;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.news-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.news-card__category {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.news-card__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.news-card__source {
  display: flex;
  align-items: center;
  gap: 4px;
}

.news-card__source-dot {
  width: 4px;
  height: 4px;
  background: var(--accent-gold);
  border-radius: 50%;
}

/* --- Quick Links --- */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px 0;
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  text-align: center;
}

.quick-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.quick-link__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.quick-link__icon--visa { background: rgba(59, 130, 246, 0.12); color: var(--accent-blue); }
.quick-link__icon--hospital { background: rgba(239, 68, 68, 0.12); color: var(--accent-red); }
.quick-link__icon--school { background: rgba(168, 85, 247, 0.12); color: var(--accent-purple); }
.quick-link__icon--housing { background: rgba(20, 184, 166, 0.12); color: var(--accent-teal); }
.quick-link__icon--golf { background: rgba(34, 197, 94, 0.12); color: var(--accent-green); }
.quick-link__icon--transport { background: rgba(236, 72, 153, 0.12); color: var(--accent-pink); }

.quick-link__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.quick-link__desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --- Sidebar --- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar__card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sidebar__card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar__card-body {
  padding: 12px 16px;
}

/* BBS Preview */
.bbs-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.bbs-item:last-child {
  border-bottom: none;
}

.bbs-item:hover {
  opacity: 0.8;
}

.bbs-item__category {
  font-size: 0.7rem;
  color: var(--accent-teal);
  font-weight: 600;
  margin-bottom: 3px;
}

.bbs-item__title {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bbs-item__meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  gap: 8px;
}

/* Events Preview */
.event-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.event-item:last-child {
  border-bottom: none;
}

.event-item__date {
  width: 44px;
  height: 50px;
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid rgba(212, 168, 67, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-item__date-month {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-family: var(--font-en);
}

.event-item__date-day {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
  font-family: var(--font-en);
}

.event-item__info {
  min-width: 0;
}

.event-item__title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.event-item__location {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Exchange widget */
.exchange-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exchange-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.exchange-row__pair {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.exchange-row__flag {
  font-size: 16px;
}

.exchange-row__rate {
  color: var(--accent-gold);
  font-weight: 700;
  font-family: var(--font-en);
}

.exchange-row__change {
  font-size: 0.7rem;
  font-family: var(--font-en);
}

.exchange-row__change.up { color: var(--accent-teal); }
.exchange-row__change.down { color: var(--accent-red); }

/* --- Restaurant/Gourmet Section --- */
.gourmet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gourmet-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
}

.gourmet-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.gourmet-card__img {
  height: 140px;
  overflow: hidden;
}

.gourmet-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gourmet-card:hover .gourmet-card__img img {
  transform: scale(1.08);
}

.gourmet-card__body {
  padding: 14px;
}

.gourmet-card__name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.gourmet-card__area {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.gourmet-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gourmet-card__stars {
  color: var(--accent-gold);
  font-size: 12px;
  letter-spacing: 2px;
}

.gourmet-card__score {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-en);
}

.gourmet-card__tags {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.gourmet-tag {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* --- BBS Section --- */
.bbs-section .bbs-categories {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bbs-cat-btn {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.bbs-cat-btn:hover, .bbs-cat-btn.active {
  color: var(--accent-gold);
  border-color: rgba(212, 168, 67, 0.3);
  background: rgba(212, 168, 67, 0.08);
}

.bbs-thread {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bbs-thread:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.bbs-thread__cat-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.bbs-thread__cat-badge--housing { background: rgba(20, 184, 166, 0.12); color: var(--accent-teal); }
.bbs-thread__cat-badge--golf { background: rgba(34, 197, 94, 0.12); color: var(--accent-green); }
.bbs-thread__cat-badge--sell { background: rgba(59, 130, 246, 0.12); color: var(--accent-blue); }
.bbs-thread__cat-badge--question { background: rgba(168, 85, 247, 0.12); color: var(--accent-purple); }
.bbs-thread__cat-badge--chat { background: rgba(236, 72, 153, 0.12); color: var(--accent-pink); }
.bbs-thread__cat-badge--alert { background: rgba(239, 68, 68, 0.12); color: var(--accent-red); }

.bbs-thread__body {
  flex: 1;
  min-width: 0;
}

.bbs-thread__title {
  font-size: 0.9rem;
  font-weight: 500;
}

.bbs-thread__meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.bbs-thread__stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.bbs-thread__stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
  margin-top: 48px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer__brand-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 320px;
}

.footer__social {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.footer__social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.footer__social-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(212, 168, 67, 0.08);
}

.footer__column-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer__link {
  display: block;
  font-size: 0.825rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--accent-gold);
}

.footer__bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .gourmet-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero__carousel {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .header__nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
    gap: 2px;
  }
  .header__nav.open {
    display: flex;
  }
  .header__mobile-toggle {
    display: flex;
  }
  .header__search {
    width: 140px;
  }
  .hero__carousel {
    grid-template-columns: 1fr;
    height: auto;
  }
  .hero__main {
    height: 240px;
  }
  .hero__side {
    flex-direction: row;
  }
  .hero__side-item {
    height: 140px;
  }
  .quick-links {
    grid-template-columns: repeat(2, 1fr);
  }
  .sidebar {
    grid-template-columns: 1fr;
  }
  .gourmet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-card {
    flex-direction: column;
  }
  .news-card__img {
    width: 100%;
    height: 160px;
  }
  .infobar__inner {
    gap: 16px;
    font-size: 0.72rem;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .quick-links { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gourmet-grid { grid-template-columns: 1fr; }
  .hero__side { flex-direction: column; }
  .hero__side-item { height: 120px; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.animate-in:nth-child(2) { animation-delay: 0.08s; }
.animate-in:nth-child(3) { animation-delay: 0.16s; }
.animate-in:nth-child(4) { animation-delay: 0.24s; }
.animate-in:nth-child(5) { animation-delay: 0.32s; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Additions */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spin {
  animation: spin 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes flash {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

.flash {
  animation: flash 0.4s ease-out forwards;
}

/* ===================================
   BBS Post Modal & UI Elements
   =================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.modal__container {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  z-index: 2001;
}

.modal.open .modal__container {
  transform: translateY(0);
}

.modal__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal__close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal__close:hover {
  color: var(--accent-gold);
}

.modal__form {
  padding: 20px;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow);
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Button variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #fff;
}

.btn--primary:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow);
}

.btn--secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn--secondary:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

/* ===================================
   News Detail Modal Premium Styles
   =================================== */
.news-modal__body {
  padding: 0 32px 24px 32px;
  max-height: 68vh;
  overflow-y: auto;
}

.news-modal__title {
  margin: 12px 0 16px 0 !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.01em;
}

.news-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 20px !important;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.news-modal__img-container {
  float: left;
  width: 240px;
  height: 160px;
  margin-right: 20px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  position: relative;
}

/* 掲示板詳細の添付画像用 (文章を優先するため左上回り込み) */
.bbs-detail-modal__img-container {
  float: left;
  width: 220px;
  height: 150px;
  margin-right: 20px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  position: relative;
}

/* 画像に重ねて表示するプレミアムキャプション */
.news-modal__img-overlay-caption {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: rgba(241, 245, 249, 0.85);
  font-size: 0.6rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.news-modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-modal__summary {
  font-size: 0.975rem !important;
  line-height: 1.95 !important;
  color: var(--text-secondary) !important;
  white-space: pre-wrap;
  margin-bottom: 8px !important;
  letter-spacing: 0.04em;
  font-weight: 400;
  text-align: justify;
}

.news-modal__footer {
  padding: 16px 24px 24px 24px !important;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Custom Scrollbar for Premium Feel */
.news-modal__body::-webkit-scrollbar {
  width: 6px;
}

.news-modal__body::-webkit-scrollbar-track {
  background: transparent;
}

.news-modal__body::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 99px;
}

.news-modal__body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

@media (max-width: 576px) {
  .news-modal__body {
    padding: 0 16px 16px 16px;
  }
  .news-modal__title {
    font-size: 1.15rem !important;
  }
  .news-modal__img-container,
  .bbs-detail-modal__img-container {
    float: none;
    width: 100%;
    height: 180px;
    margin-right: 0;
    margin-bottom: 16px;
  }
  .news-modal__footer {
    padding: 12px 16px 16px 16px !important;
  }
}

/* ===================================
   BBS Replies Section Styles
   =================================== */
.bbs-replies-section {
  clear: both; /* 回り込みを解除して返信セクションを開始 */
}

.bbs-reply-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.bbs-reply-item:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(212, 168, 67, 0.15);
}

.bbs-reply-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  font-weight: bold;
}

.bbs-reply-content-area {
  flex: 1;
  min-width: 0;
}

.bbs-reply-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.78rem;
}

.bbs-reply-author {
  font-weight: 600;
  color: var(--text-primary);
}

.bbs-reply-time {
  color: var(--text-muted);
  font-family: var(--font-en);
}

.bbs-reply-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

.bbs-replies-count-badge {
  font-family: var(--font-en);
  font-weight: 700;
}

/* 返信フォームのプレミアムスタイル */
.bbs-reply-form {
  margin-top: 20px;
}

.bbs-reply-form .form-control {
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.bbs-reply-form .form-control:focus {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .bbs-reply-form .form-control:focus {
  background: #ffffff;
}

.bbs-reply-form button[type="submit"] {
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bbs-reply-form button[type="submit"]:hover {
  transform: translateY(-1px);
}

/* ===================================
   Life Guide Modal Styles
   =================================== */
.life-guide__content {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.life-guide__section {
  margin-bottom: 24px;
}

.life-guide__section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 12px 0;
  border-left: 3px solid var(--accent-gold);
  padding-left: 10px;
}

.life-guide__subsection-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 16px 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.life-guide__list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 16px;
}

.life-guide__list-item {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.life-guide__list-item::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--accent-gold);
  font-weight: bold;
}

.life-guide__highlight-box {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-teal);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 0.9rem;
}

.life-guide__highlight-box.warning {
  border-left-color: var(--accent-red);
  background: rgba(239, 68, 68, 0.02);
}

.life-guide__highlight-box-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.life-guide__table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.88rem;
}

.life-guide__table th, .life-guide__table td {
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  text-align: left;
}

.life-guide__table th {
  background: var(--bg-glass);
  font-weight: 600;
  color: var(--text-primary);
}

.life-guide__table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

/* ===================================
   BBS Inquiry (Private Contact) Styles
   =================================== */
.bbs-inquiry-section {
  clear: both;
}

.bbs-inquiry-toggle-btn:hover {
  background: rgba(20, 184, 166, 0.14) !important;
  border-color: rgba(20, 184, 166, 0.3) !important;
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.1);
}

.bbs-inquiry-accordion-content {
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: rgba(255, 255, 255, 0.01);
  padding: 16px 14px 14px 14px !important;
  margin-top: -4px;
}

.bbs-inquiry-form .form-control {
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.bbs-inquiry-form .form-control:focus {
  border-color: var(--accent-teal);
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .bbs-inquiry-form .form-control:focus {
  background: #ffffff;
}

/* トースト通知 */
.toast-notification {
  min-width: 300px;
  max-width: 90vw;
  background: rgba(16, 185, 129, 0.95); /* エメラルドグリーン */
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(-20px);
  animation: toast-in 0.3s forwards, toast-out 0.3s 2.7s forwards;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* ===================================
   Header Region Select Styles
   =================================== */
.header__region-select-container {
  display: flex;
  align-items: center;
}

.header__region-select {
  padding: 6px 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  max-width: 220px;
}

.header__region-select:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-gold);
}

.header__region-select:focus {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow);
}

/* プルダウンオプションの背景色（ダークテーマ対応） */
.header__region-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* スマホ表示時などでの調整 */
@media (max-width: 768px) {
  .header__region-select {
    max-width: 140px;
    font-size: 0.72rem;
    padding: 4px 6px;
  }
}

/* ===================================
   Notification System Styles
   =================================== */
.header__notification-container {
  display: inline-block;
}

.header__notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent-red);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg-secondary);
  font-family: var(--font-en);
}

.header__notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  overflow: hidden;
  animation: modalFadeIn 0.2s ease;
}

.header__notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}

.header__notification-list {
  max-height: 280px;
  overflow-y: auto;
}

.notification-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.notification-item:hover {
  background: var(--bg-glass-hover);
}

.notification-item--unread {
  background: rgba(212, 168, 67, 0.05);
  border-left: 3px solid var(--accent-gold);
}

.notification-item__title {
  font-weight: 600;
  color: var(--text-primary);
}

.notification-item__time {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ===================================
   Gourmet Card & Favorite Styles
   =================================== */
.gourmet-card {
  position: relative;
}

.gourmet-card__fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
  color: #fff;
}

.gourmet-card__fav-btn:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.7);
}

.gourmet-card__fav-btn.active {
  color: #ef4444;
  background: #ffffff;
  border-color: #ffffff;
}

/* Gourmet Filter buttons active status */
.gourmet-filter-btn.active {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  font-weight: bold;
}

/* ===================================
   Sidebar Utility Tabs & Simulators
   =================================== */
.utility-tab-btn.active {
  background: var(--bg-glass) !important;
  color: var(--text-primary) !important;
  font-weight: bold;
}

/* Progress bar for simulator */
.liv-breakdown-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.liv-breakdown-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.liv-breakdown-progress-container {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.liv-breakdown-progress {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* --- Weather & AQI Card Styles --- */
#weatherAqiContainer.aqi-good {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #10b981;
}
#weatherAqiContainer.aqi-moderate {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}
#weatherAqiContainer.aqi-unhealthy {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
}
#weatherAqiContainer.aqi-hazardous {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #8b5cf6;
}

.weather-forecast-day {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}
.weather-forecast-day:hover {
  background: var(--bg-glass-hover);
  transform: translateY(-2px);
}
.weather-forecast-day__name {
  font-size: 0.65rem;
  color: var(--text-muted);
}
.weather-forecast-day__icon {
  font-size: 1.1rem;
}
.weather-forecast-day__temp {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-en);
}

/* --- News Modal Reaction & Comments Styles --- */
#newsModalLikeBtn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
#newsModalLikeBtn.liked {
  background: rgba(212, 168, 67, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.news-comment-item {
  display: flex;
  gap: 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.news-comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-teal));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  flex-shrink: 0;
}
.news-comment-body {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
}
.news-comment-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}
.news-comment-author {
  font-weight: bold;
  color: var(--text-primary);
}
.news-comment-time {
  color: var(--text-muted);
  font-size: 0.68rem;
}
.news-comment-text {
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-all;
}

/* --- Dummy Map Preview Styles --- */
.dummy-map-preview {
  position: relative;
  height: 180px;
  background-color: var(--bg-primary);
  background-image: 
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 16px 0;
}
.dummy-map-coordinate {
  position: absolute;
  font-size: 0.62rem;
  color: var(--text-muted);
  font-family: var(--font-en);
}
.dummy-map-coordinate.top-left { top: 6px; left: 8px; }
.dummy-map-coordinate.bottom-right { bottom: 6px; right: 8px; }

.dummy-map-road {
  position: absolute;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}
.dummy-map-road.vertical {
  width: 32px;
  height: 100%;
  left: 45%;
}
.dummy-map-road.horizontal {
  width: 100%;
  height: 32px;
  top: 55%;
}

.dummy-map-pin-container {
  position: absolute;
  top: 55%;
  left: 45%;
  transform: translate(-50%, -100%);
  z-index: 2;
  pointer-events: none;
}
.dummy-map-pin {
  font-size: 1.6rem;
  animation: bounce-pin 1.2s ease-in-out infinite alternate;
}
.dummy-map-pulse {
  position: absolute;
  width: 16px;
  height: 6px;
  background: rgba(212, 168, 67, 0.4);
  border-radius: 50%;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  animation: pulse-shadow 1.2s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes bounce-pin {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}
@keyframes pulse-shadow {
  0% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  100% { transform: translateX(-50%) scale(0.6); opacity: 0.3; }
}

.btn--map {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark)) !important;
  color: var(--text-inverse) !important;
  font-weight: 700 !important;
}
.btn--map:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow);
}

/* ===================================
   豆知識ウィジェット (Trivia Widget)
   =================================== */
@keyframes rotateSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.spin-animation {
  animation: rotateSpin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   タイ語フラッシュカード (3D Flashcard)
   =================================== */
.flashcard-wrapper {
  perspective: 1000px;
}
.flashcard {
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  width: 100%;
  height: 100%;
}
.flashcard.flipped {
  transform: rotateY(180deg);
}
.flashcard-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.flashcard-front {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.flashcard-back {
  transform: rotateY(180deg);
}
.flashcard-wrapper:hover .flashcard {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  border-color: rgba(20, 184, 166, 0.5);
}




/* ==========================================================================
   Event Calendar Styles (Added for Monthly Calendar)
   ========================================================================== */
.calendar-day-cell {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.calendar-day-cell:hover {
  background: rgba(20, 184, 166, 0.05);
  border-color: var(--accent-teal);
}

.calendar-day-cell--prev,
.calendar-day-cell--next {
  opacity: 0.35;
  cursor: default;
}

.calendar-day-cell--today {
  border: 2px solid var(--accent-teal);
  background: rgba(20, 184, 166, 0.04);
}

.calendar-day-cell--selected {
  background: rgba(20, 184, 166, 0.1) !important;
  border-color: var(--accent-teal) !important;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.calendar-day-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.calendar-day-cell--prev .calendar-day-number,
.calendar-day-cell--next .calendar-day-number {
  font-weight: normal;
}

.calendar-day-cell[data-wday="0"] .calendar-day-number {
  color: #ef4444; /* 日曜日は赤 */
}
.calendar-day-cell[data-wday="6"] .calendar-day-number {
  color: #3b82f6; /* 土曜日は青 */
}

.calendar-event-badges {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  overflow: hidden;
}

.calendar-event-badge-item {
  font-size: 0.62rem;
  padding: 1px 3px;
  border-radius: 3px;
  background: var(--accent-teal);
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-align: left;
  border-left: 2px solid var(--accent-gold);
}

.calendar-day-cell--prev .calendar-event-badge-item,
.calendar-day-cell--next .calendar-event-badge-item {
  background: var(--text-muted);
  border-left-color: var(--border-color);
}

/* Selected Events Layout */
.calendar-detail-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-detail-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-teal);
}

.calendar-detail-title {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.calendar-detail-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 4px 0 0 0;
}

/* ===================================
   Advertisement & Sponsor Styles
   =================================== */
.ad-banner-horizontal {
  margin: 32px 0;
  text-align: center;
  width: 100%;
}

.ad-banner-horizontal__label {
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
  font-family: var(--font-en);
}

.ad-banner-horizontal__body {
  background: var(--bg-glass);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.ad-banner-horizontal__body:hover {
  border-color: var(--accent-gold);
  background: var(--bg-glass-hover);
}

/* Sponsor item hover and active states */
.sponsor-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--accent-gold) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sponsor-recruit-link:hover {
  color: var(--accent-gold-light) !important;
  text-shadow: 0 0 8px rgba(212, 168, 67, 0.4);
}

/* Light theme overrides if any */
[data-theme="light"] .ad-banner-horizontal__body {
  background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .sponsor-item {
  background: rgba(0, 0, 0, 0.01) !important;
}
[data-theme="light"] .sponsor-item:hover {
  background: rgba(0, 0, 0, 0.03) !important;
}

/* ===================================
   今日のタイ生活チェック (Dashboard)
   =================================== */
.dashboard-section {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.dashboard__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-left: 4px solid var(--accent-gold);
  padding-left: 0.75rem;
}

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

.dashboard-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
  background: var(--bg-glass-hover);
  box-shadow: var(--shadow-glow);
}

.dashboard-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dashboard-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.dashboard-card__icon {
  font-size: 1.2rem;
}

.dashboard-card__value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.dashboard-card__note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.dashboard-card__btn {
  margin-top: 0.75rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all var(--transition-fast);
}

.dashboard-card__btn:hover {
  background: var(--accent-gold);
  color: var(--text-inverse);
  border-color: var(--accent-gold);
}

/* 記事メタバッジ */
.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.meta-badge--source {
  border-color: rgba(20, 184, 166, 0.3);
  color: var(--accent-teal);
}

.meta-badge--region {
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
}

.meta-badge--target {
  border-color: rgba(249, 115, 22, 0.3);
  color: var(--accent-orange);
}
