/* ===== CSS Variables ===== */
:root {
  --green-900: #1b4332;
  --green-700: #2d6a4f;
  --green-600: #40916c;
  --green-400: #52b788;
  --green-100: #d8f3dc;
  --green-50:  #f0faf4;

  --color-primary:        var(--green-700);
  --color-primary-hover:  var(--green-900);
  --color-primary-subtle: var(--green-50);

  --color-tsuwano: #7c3aed;

  --color-bg:      #ffffff;
  --color-surface: #f8f9fa;
  --color-border:  #e5e7eb;
  --color-border-light: #f0f0f0;

  --color-text:       #1a1a2e;
  --color-text-muted: #6b7280;
  --color-text-light: #9ca3af;

  --color-error:        #dc2626;
  --color-danger-bg:    #fef2f2;
  --color-danger-ring:  #fecaca;

  --color-sun: #ef4444;
  --color-sat: #2563eb;
  --color-posted-ring: #84cc16;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.09), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.05);

  --font: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  --ease: 160ms ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  min-height: 100dvh;
}
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
a { color: inherit; }
ul, ol { list-style: none; }

/* ===== Loading ===== */
body.loading::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-primary);
  z-index: 9999;
  animation: loading-bar 1.2s ease-in-out infinite;
}
@keyframes loading-bar {
  0%,100% { transform: scaleX(0.05) translateX(0); transform-origin: left; }
  50%      { transform: scaleX(0.9); transform-origin: left; }
}

/* ===== Utilities ===== */
.hidden   { display: none !important; }
[hidden]  { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .container { padding: 0 40px; } }
@media (min-width: 1024px) { .container { padding: 0 60px; } }

/* ===== Header ===== */
.site-header {
  background: #fff;
  color: var(--color-text);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}
.site-title {
  font-size: clamp(13px, 3.5vw, 17px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-text);
  white-space: nowrap;
}
/* 更新ボタン: ヘッダーのタイトルを圧迫しないよう小さな丸ボタンにする */
#reload-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 19px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.site-title-sub {
  font-size: clamp(10px, 2.5vw, 12px);
  font-weight: 500;
  color: var(--color-text-muted);
}
.logo-banner {
  width: 100%;
  background: #c4a8e8;
}
.logo-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 500px;
  margin: 0 auto;
}
.title-br { display: block; }
@media (min-width: 540px) { .title-br { display: none; } }
.site-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
  letter-spacing: 0.01em;
}
#auth-area { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ===== Cleanup banner ===== */
.cleanup-banner {
  background: #fffbeb;
  border-bottom: 2px solid #fbbf24;
  padding: 10px 0;
  font-size: 13px;
}
.cleanup-banner .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cleanup-banner p { flex: 1; min-width: 200px; color: #92400e; font-weight: 500; }
.cleanup-actions  { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover:not(:disabled) { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }

.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover:not(:disabled) { background: var(--color-primary-subtle); }

.btn-ghost { background: transparent; color: var(--color-text-muted); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--color-surface); color: var(--color-text); }

.btn-danger-outline { background: transparent; color: var(--color-error); border-color: var(--color-error); }
.btn-danger-outline:hover:not(:disabled) { background: var(--color-danger-bg); }

.btn-danger { color: var(--color-error) !important; border-color: transparent !important; background: transparent !important; }
.btn-danger:hover:not(:disabled) { background: var(--color-danger-bg) !important; }

.btn-sm  { padding: 7px 12px; font-size: 13px; }
.btn-xs  { padding: 5px 9px;  font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* On light header */
.site-header .btn-ghost {
  color: var(--color-text-muted);
  border-color: var(--color-border);
}
.site-header .btn-ghost:hover:not(:disabled) {
  background: var(--color-surface);
  color: var(--color-text);
}

/* ===== Navigation btn ===== */
.nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
  transition: background var(--ease), border-color var(--ease), color var(--ease);
  flex-shrink: 0;
}
.nav-btn:hover { background: var(--color-surface); border-color: var(--color-primary); color: var(--color-primary); }
.nav-btn:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }

/* ===== Sections ===== */
.section { padding: 24px 0; border-top: 1px solid var(--color-border-light); }
.section:first-child { border-top: none; padding-top: 4px; }
.calendar-section { padding-bottom: 20px; border-top: none; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}
.section-title svg    { color: var(--color-primary); flex-shrink: 0; }
.tsuwano-title        { color: var(--color-tsuwano); }
.tsuwano-title svg    { color: var(--color-tsuwano); }

/* ===== Calendar ===== */
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-top: 16px;
}
.calendar-nav h2 {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.calendar-hint { font-size: 12px; color: var(--color-text-light); margin-bottom: 10px; text-align: center; line-height: 1.7; }
.calendar-wrapper { border: 1.5px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--color-primary-subtle);
  border-bottom: 1.5px solid var(--color-border);
}
.calendar-weekdays span { text-align: center; padding: 8px 0; font-size: 12px; font-weight: 700; color: var(--color-text-muted); letter-spacing: 0.04em; }
.calendar-weekdays .sun { color: var(--color-sun); }
.calendar-weekdays .sat { color: var(--color-sat); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--color-border-light);
}
.calendar-cell {
  background: var(--color-bg);
  min-height: 58px;
  padding: 4px 3px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: background var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.calendar-cell:hover  { background: var(--color-primary-subtle); }
.calendar-cell:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.calendar-cell.empty  { cursor: default; background: var(--color-surface); }
.calendar-cell.empty:hover { background: var(--color-surface); }

.day-number {
  font-size: 13px; font-weight: 500; line-height: 1;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; flex-shrink: 0;
}
.calendar-cell.today  .day-number { background: var(--color-primary); color: #fff; font-weight: 700; }
.calendar-cell.sun    .day-number { color: var(--color-sun); }
.calendar-cell.sat    .day-number { color: var(--color-sat); }
.calendar-cell.today.sun .day-number,
.calendar-cell.today.sat .day-number { color: #fff; }

.day-dots { display: flex; gap: 3px; margin-top: 5px; padding: 0 2px; flex-wrap: wrap; justify-content: center; }
.day-dot  { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary); flex-shrink: 0; opacity: 0.85; }
.day-dot-plus { font-size: 11px; font-weight: 800; color: var(--color-primary); line-height: 6px; }

@media (min-width: 480px) {
  .calendar-cell { min-height: 70px; padding: 5px 4px; }
  .day-number    { font-size: 14px; width: 24px; height: 24px; }
  .day-dot       { width: 8px; height: 8px; }
  .day-thumb     { width: 20px; height: 20px; }
}
@media (min-width: 640px) {
  .calendar-cell { min-height: 84px; padding: 6px 5px; }
  .day-number    { font-size: 15px; width: 26px; height: 26px; }
  .day-thumb     { width: 24px; height: 24px; border-radius: 4px; }
}

/* ===== Event List (compact rows) ===== */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background var(--ease);
  -webkit-tap-highlight-color: transparent;
  border-radius: 0;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover      { background: var(--color-primary-subtle); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--radius-sm); }
.list-item:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--radius-sm); }

.list-thumb {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.list-thumb-placeholder {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-subtle);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--color-primary);
}
.list-date-badge {
  width: 46px;
  min-height: 50px;
  background: var(--color-primary);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px 2px;
  gap: 1px;
}
.list-date-month {
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  line-height: 1;
}
.list-date-day {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  font-family: 'Inter', sans-serif;
}
.list-info  { flex: 1; min-width: 0; }
.list-title    { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.list-end-date { font-size: 11px; color: var(--color-primary); font-weight: 600; margin-top: 1px; }
.list-place    { font-size: 12px; color: var(--color-text-light); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-arrow { color: var(--color-text-light); flex-shrink: 0; }

.empty-msg { color: var(--color-text-muted); font-size: 14px; padding: 8px 0; }

/* ===== News cards ===== */
.news-grid { display: flex; flex-direction: column; gap: 12px; }
.news-card {
  display: flex;
  flex-direction: row;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--ease);
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 540px) {
  .news-card { flex-direction: column; }
}
.news-card:hover { box-shadow: var(--shadow-md); }
.news-card:focus-visible { outline: 3px solid var(--color-primary); }

@media (min-width: 540px) {
  .news-grid  { display: grid; grid-template-columns: repeat(2, 1fr); }
}

/* モバイル: 横並びカード */
.news-card-img  { width: 120px; height: 120px; flex-shrink: 0; object-fit: cover; }
.news-card-img-placeholder {
  width: 120px; height: 120px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  color: var(--color-text-light);
}
.news-card-side { display: flex; flex-direction: column; flex-shrink: 0; width: 120px; }
.news-card-side .news-card-date { margin-top: auto; padding: 6px 0 8px 6px; }
@media (min-width: 540px) {
  .news-card-side { width: 100%; }
  .news-card-side .news-card-date { margin-top: 0; padding: 6px 14px 0; }
}
.news-card-body { padding: 10px 12px; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.news-card-desc { -webkit-line-clamp: 2; }

/* タブレット以上: 縦並びグリッド */
@media (min-width: 540px) {
  .news-card-img { width: 100%; height: 140px; }
  .news-card-img-placeholder { width: 100%; height: 100px; }
  .news-card-body { padding: 12px 14px; gap: 5px; }
  .news-card-desc { -webkit-line-clamp: 2; }
}
.news-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.news-card-source {
  font-size: 10px; font-weight: 700;
  background: var(--color-primary); color: #fff;
  padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.02em;
}
.news-card-date { font-size: 11px; color: var(--color-text-light); }
.news-card-tag { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.news-card-tag--store { background: #fee2e2; color: #b91c1c; }
.sub-tab-btn--store { color: #b91c1c; }
.sub-tab-btn--store.active { background: #fee2e2; color: #b91c1c; border-color: #b91c1c; }
.drawer-item--store { color: #b91c1c; font-weight: 700; }
.news-card-title { font-size: 16px; font-weight: 700; line-height: 1.45; }
.news-card-desc { font-size: 13px; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-link {
  display: inline-block; margin-top: 2px;
  font-size: 12px; color: var(--color-primary);
  text-decoration: none; font-weight: 600;
}
.news-card-link:hover { text-decoration: underline; }

/* ===== Admin toolbar ===== */
.admin-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 0 0;
  border-top: 1px solid var(--color-border-light);
}

/* ===== Day event list (inside day modal) ===== */
.day-event-list { margin-top: 12px; display: flex; flex-direction: column; gap: 16px; }
.day-event-row {
  border: 2px solid #d1d5db;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.day-event-thumb-wrap { position: relative; width: 100%; }
.day-event-thumb-wrap .day-event-thumb { width: 100%; display: block; }
.day-event-thumb-hint {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 12px;
  text-align: center;
  padding: 6px 0;
  pointer-events: none;
}
.day-event-info { padding: 10px 12px; }
.day-event-title { font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--color-text); }
.day-event-place { font-size: 12px; color: var(--color-text-light); margin-top: 4px; }
.day-event-list .list-item { padding: 10px 0; }

/* ===== Detail modal content ===== */
.detail-body { gap: 16px; }

.detail-gallery {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: -4px;
  padding: 4px;
}
.detail-gallery::-webkit-scrollbar { height: 4px; }
.detail-gallery::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }

.detail-img-wrap {
  flex-shrink: 0;
  width: 240px;
  height: 180px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.detail-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.detail-img-wrap:hover img { transform: scale(1.04); }
.detail-img-wrap:focus-visible { outline: 3px solid var(--color-primary); }
.detail-img-hint {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 11px;
  text-align: center;
  padding: 4px 0;
  pointer-events: none;
}

@media (max-width: 479px) {
  .detail-img-wrap { width: 200px; height: 150px; }
}

.detail-meta     { display: flex; flex-direction: column; gap: 5px; }
.meta-item       { display: flex; align-items: flex-start; gap: 5px; font-size: 13px; color: var(--color-text-muted); }
.meta-item svg   { flex-shrink: 0; margin-top: 2px; color: var(--color-text-light); }

.detail-comment  { font-size: 14px; color: var(--color-text); line-height: 1.7; white-space: pre-wrap; }

.detail-admin-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-light);
}
.detail-admin-actions .check-label { margin-right: auto; }

/* ===== Forms ===== */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-row   { display: flex; flex-wrap: wrap; gap: 12px; }
.form-row .form-group { flex: 1 1 120px; }

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.label-note { font-size: 11px; font-weight: 400; color: var(--color-text-muted); margin-left: 4px; }
.required   { color: var(--color-error); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}
textarea { resize: vertical; min-height: 88px; }
select   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }

.readonly-input { background: var(--color-surface); color: var(--color-text-muted); cursor: default; }

.form-hint { font-size: 11px; color: var(--color-text-light); margin-top: 4px; line-height: 1.4; }

.form-error {
  background: var(--color-danger-bg);
  color: var(--color-error);
  border: 1px solid var(--color-danger-ring);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
}
.form-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-muted);
  user-select: none;
}
.check-label input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-light);
  margin-top: 4px;
}

/* ===== Image upload ===== */
.image-upload-area {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--color-surface);
  transition: border-color var(--ease);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.image-upload-area:has(input:focus) { border-color: var(--color-primary); }

.image-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.img-preview-item {
  position: relative;
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.remove-img-btn {
  position: absolute;
  top: 3px; right: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
  cursor: pointer;
  transition: background var(--ease);
}
.remove-img-btn:hover { background: rgba(0,0,0,0.88); }

.image-add-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  transition: border-color var(--ease), background var(--ease), color var(--ease);
  width: fit-content;
}
.image-add-label:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-subtle); }

/* ===== Import ===== */
.import-note {
  font-size: 13px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  line-height: 1.7;
}
.import-note code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  background: rgba(0,0,0,0.06);
  padding: 1px 4px;
  border-radius: 3px;
}
.import-preview {
  background: var(--color-primary-subtle);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
}
.import-preview ul { margin-top: 8px; padding-left: 16px; list-style: disc; color: var(--color-text-muted); }
.import-preview li { margin-bottom: 3px; }

/* ===== Modals ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
@media (min-width: 640px) { .modal { align-items: center; } }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,15,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.modal-content {
  position: relative;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: auto;
  animation: modal-in 180ms ease;
}
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 660px; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1.5px solid var(--color-border-light);
  position: sticky; top: 0;
  background: var(--color-bg);
  z-index: 1;
}
.modal-title  { font-size: 17px; font-weight: 700; }
.modal-close  {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  transition: background var(--ease), color var(--ease);
  flex-shrink: 0;
}
.modal-close:hover  { background: var(--color-surface); color: var(--color-text); }
.modal-close:focus-visible { outline: 3px solid var(--color-primary); }

.modal-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.day-register-bottom { margin-top: 8px; }

.day-scroll-hint {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px 0 14px;
  background: linear-gradient(to bottom, transparent, var(--color-bg) 55%);
  font-size: 12px;
  color: var(--color-text-light);
  pointer-events: none;
}
.day-scroll-hint-arrow {
  font-size: 18px;
  animation: bounce-down 1.2s ease-in-out infinite;
}
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}
body.modal-open { overflow: hidden; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(0,0,0,0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}
.lightbox-imgs {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  cursor: default;
}
.lightbox-imgs img {
  max-width: min(calc(100vw - 80px), 800px);
  max-height: calc(100dvh - 80px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.lightbox-close {
  position: fixed;
  top: 16px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--ease);
  z-index: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,0.28); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  animation: toast-in 180ms ease;
  max-width: calc(100vw - 32px);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.toast-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.toast-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.toast-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== Header title wrap ===== */
.header-title-wrap { flex: 1; min-width: 0; }

/* ===== Site icon in header ===== */
.site-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ===== Hamburger button ===== */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 7px 6px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}
.hamburger-btn:focus-visible { outline: 3px solid var(--color-primary); border-radius: 6px; }

/* ===== Nav Drawer ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 85vw);
  background: var(--color-bg);
  z-index: 300;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: drawer-in 200ms ease;
}
@keyframes drawer-in {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--color-primary);
  color: #fff;
  flex-shrink: 0;
}
.drawer-title { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
.drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  transition: background var(--ease);
  cursor: pointer;
}
.drawer-close:hover { background: rgba(255,255,255,0.18); color: #fff; }
.drawer-close:focus-visible { outline: 2px solid rgba(255,255,255,0.5); border-radius: 50%; }

.drawer-list { display: flex; flex-direction: column; padding: 8px 0; }
.drawer-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--color-text-light);
  padding: 14px 16px 5px;
  text-transform: uppercase;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--ease), color var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.drawer-item:hover { background: var(--color-primary-subtle); color: var(--color-primary); }
.drawer-item:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.drawer-item--sub {
  font-size: 14px;
  font-weight: 400;
  padding: 10px 16px 10px 30px;
  color: var(--color-text-muted);
}
.drawer-item--sub:hover { color: var(--color-primary); }

/* ===== Tab bar ===== */
.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--color-border);
  margin: 12px -16px 0;
  padding: 0 16px;
}
@media (min-width: 640px) { .tab-bar { margin-left: -24px; margin-right: -24px; padding: 0 24px; } }
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.tab-btn:hover  { color: var(--color-text); }
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.tab-btn:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; border-radius: 4px; }
.tab-panel { padding-top: 16px; min-height: 100px; }

/* ===== Sub-tab bar ===== */
.sub-tab-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.sub-tab-btn {
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.sub-tab-btn:hover  { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-subtle); }
.sub-tab-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.sub-tab-btn:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.sub-tab-note { font-size: 11px; opacity: 0.8; }

/* ===== Detail modal extras ===== */
.detail-meta-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--color-text-muted); }
.detail-meta-label { font-weight: 600; color: var(--color-text); flex-shrink: 0; min-width: 36px; }
.detail-link {
  display: inline-block;
  color: var(--color-primary);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.detail-link:hover { color: var(--color-primary-hover); }
.detail-admin-btns { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--color-border-light); }

/* ===== Latest Event horizontal scroll ===== */
.latest-section { padding: 16px 0 4px; }
.latest-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.latest-en {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}
.latest-ja { font-size: 12px; color: var(--color-text-muted); letter-spacing: 0.03em; }

.latest-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.latest-scroll::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .latest-scroll { margin: 0 -24px; padding-left: 24px; padding-right: 24px; } }

.latest-card {
  flex-shrink: 0;
  width: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  scroll-snap-align: start;
  transition: box-shadow var(--ease), transform var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.latest-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.latest-card:focus-visible { outline: 3px solid var(--color-primary); }

.latest-card-img {
  width: 100%;
  height: 130px;
  overflow: hidden;
  background: var(--color-primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  opacity: 0.5;
}
.latest-card-img img { width: 100%; height: 100%; object-fit: cover; opacity: 1; display: block; }

.latest-card-body { padding: 9px 10px 10px; }
.latest-card-area {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}
/* エリア別カラー */
.latest-card-area[data-area="市街地"]  { color: #475569; background: #f1f5f9; }
.latest-card-area[data-area="美都"]    { color: #c2410c; background: #ffedd5; }
.latest-card-area[data-area="匹見"]    { color: #166534; background: #dcfce7; }
.latest-card-area[data-area="浜田市"]  { color: #0e7490; background: #cffafe; }
.latest-card-area[data-area="津和野"]  { color: #6d28d9; background: #ede9fe; }
.latest-card-area[data-area="その他"]  { color: #475569; background: #f1f5f9; }
.latest-card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
  color: var(--color-text);
}
.latest-card-date { font-size: 11px; color: var(--color-text-muted); }

/* ===== Design Refresh ===== */

/* Font: use Inter for numbers/Latin */
:root {
  --font: 'Inter', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
}

/* Calendar: keep bordered design, just tweak nav */
.calendar-nav { padding-top: 20px; }
.calendar-nav h2 { font-size: 16px; letter-spacing: 0.02em; font-weight: 700; }
.calendar-weekdays span { font-size: 11px; letter-spacing: 0.06em; font-weight: 600; }

/* LATEST EVENT: editorial heading */
.latest-section { padding: 20px 0 8px; }
.latest-heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 14px;
}
.latest-en {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.latest-ja {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  display: block;
}

/* LATEST EVENT: bigger, more polished cards */
.latest-card {
  width: 234px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.latest-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-3px); }
.latest-card-img { height: 182px; }
.latest-card-body { padding: 13px 16px 16px; }
.latest-card-area {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.latest-card-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.latest-card-date { font-size: 14px; font-family: 'Inter', sans-serif; }

/* Event list: cleaner, more spacious */
.list-item { padding: 13px 0; gap: 14px; }
.list-thumb, .list-thumb-placeholder { width: 60px; height: 60px; border-radius: 10px; }
.list-date-badge { width: 50px; min-height: 54px; border-radius: 11px; }
.list-date-day { font-size: 24px; }
.list-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.list-place { font-size: 12px; margin-top: 3px; }

/* Tab bar: cleaner */
.tab-btn { font-size: 13px; padding: 11px 14px; letter-spacing: 0.01em; }

/* Section: more breathing room */
.tab-panel { padding-top: 20px; }

/* News cards: softer */
.news-card {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: none;
  transition: box-shadow var(--ease), transform var(--ease);
}
.news-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
.news-card-title { font-size: 16px; letter-spacing: -0.01em; }
.news-card-body { padding: 14px 16px; gap: 5px; }

/* Footer: clean redesign */
.site-footer-bottom {
  margin-top: 60px;
  border-top: 1px solid var(--color-border-light);
  padding: 28px 0 100px;
}
.site-footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 12px; color: var(--color-text-light); }
.footer-link { font-size: 12px; color: var(--color-text-muted); text-decoration: none; }
.footer-link:hover { color: var(--color-primary); }

/* ===== お知らせ（さりげなく） ===== */
.oshirase-section {
  margin-top: 32px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--color-border-light);
}
.oshirase-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 10px;
}
.oshirase-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.oshirase-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.oshirase-date {
  font-size: 11px;
  color: #9ca3af;
}
.oshirase-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  line-height: 1.5;
}
.oshirase-body {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.6;
  margin-top: 2px;
}

/* ===== Bottom tab bar ===== */
.bottom-tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 400;
  display: flex;
  background: #fff;
  border-top: 1.5px solid #e5e7eb;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}
.bottom-tab-item {
  flex: 1;
  padding: 14px 0;
  border: none;
  background: none;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a.bottom-tab-item {
  text-decoration: none;
}
.bottom-tab-item.active {
  color: var(--color-primary);
  border-top: 2.5px solid var(--color-primary);
  padding-top: calc(14px - 2.5px);
}

/* ボトムタブ分のコンテンツ余白 */
main { padding-bottom: 80px; }

/* Admin toolbar: no border when empty */
.admin-toolbar:empty { display: none; }

/* ===== News section (always visible below events) ===== */
.news-section { padding: 28px 0 8px; border-top: 1px solid var(--color-border-light); }
.news-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 14px;
}
.news-en {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.news-ja {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

/* ===== Agenda modal (text-first calendar from hamburger) ===== */
.agenda-date-header {
  padding: 14px 0 8px;
  border-bottom: 1.5px solid var(--color-border);
  margin-bottom: 4px;
}
.agenda-date-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
.agenda-date-num {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  font-family: 'Inter', sans-serif;
}
.agenda-date-dow {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-left: 4px;
}
.agenda-group { margin-bottom: 20px; }
.agenda-event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.agenda-event-row:last-child { border-bottom: none; }
.agenda-event-row:hover .agenda-event-title { color: var(--color-primary); }
.agenda-event-marker {
  width: 3px;
  height: 36px;
  background: var(--color-primary);
  border-radius: 2px;
  flex-shrink: 0;
}
.agenda-event-info { flex: 1; min-width: 0; }
.agenda-event-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 150ms ease;
}
.agenda-event-place {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ===== 地図から見つける（ハンバーガー） ===== */
.map-body { padding-top: 10px; }
.map-datebar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.map-nav-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--color-border); background: var(--color-bg);
  font-size: 22px; line-height: 1; color: var(--color-text);
  cursor: pointer; flex: 0 0 auto;
}
.map-date-wrap { flex: 1; text-align: center; }
#map-date-label { font-size: 16px; font-weight: 700; display: block; color: var(--color-text); }
#map-date-input {
  margin-top: 2px; font-size: 13px; color: var(--color-text-muted);
  border: none; background: transparent; text-align: center; font-family: inherit;
}
.map-today-btn {
  flex: 0 0 auto; padding: 8px 12px; border-radius: 999px;
  border: 1.5px solid var(--color-border); background: var(--color-surface);
  font-size: 13px; font-weight: 600; color: var(--color-text); cursor: pointer;
}
#event-map {
  width: 100%; height: 46vh; min-height: 280px;
  border-radius: 12px; position: relative; z-index: 0;
  border: 1px solid var(--color-border);
}
.map-note { font-size: 11px; color: var(--color-text-muted); margin: 6px 2px 10px; }
.map-pin-wrap { background: transparent; border: none; }
.map-pin {
  width: 22px; height: 22px; border-radius: 50% 50% 50% 0;
  background: #7b5ea7; border: 2px solid #ffffff;
  transform: rotate(-45deg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.map-list-heading { font-weight: 700; font-size: 14px; margin: 4px 0 8px; color: var(--color-text); }
.map-day-row {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--color-border); border-radius: 10px;
  background: var(--color-bg); cursor: pointer; font-family: inherit;
}
.map-day-row-title { display: block; font-size: 14px; font-weight: 600; color: var(--color-text); }
.map-day-row-place { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.map-empty { font-size: 13px; color: var(--color-text-muted); padding: 8px 2px; }

/* Leaflet: サイト全体の img ルールで地図タイルが崩れるのを防ぐ */
#event-map img, .leaflet-pane img { max-width: none !important; }


/* ===== 押した感触（サイト全体） ===== */
button, .bottom-tab-item, .drawer-item, .sub-tab-btn, .map-day-row,
.calendar-cell, .latest-card, .news-card, .agenda-event-row, .day-event-row {
  -webkit-tap-highlight-color: transparent;
}
button, .bottom-tab-item, .drawer-item, .sub-tab-btn,
.map-day-row, .map-nav-btn, .map-today-btn {
  transition: transform 90ms ease, background-color 150ms ease,
    box-shadow 150ms ease, opacity 150ms ease;
}
button:active, .map-day-row:active { transform: scale(0.95); }
.calendar-cell, .latest-card, .news-card,
.agenda-event-row, .day-event-row {
  transition: transform 120ms ease, box-shadow 150ms ease,
    background-color 150ms ease;
}
.calendar-cell:active, .latest-card:active, .news-card:active,
.agenda-event-row:active, .day-event-row:active {
  transform: scale(0.97);
  background-color: var(--color-surface);
}
.drawer-item:active, .bottom-tab-item:active, .sub-tab-btn:active {
  background-color: var(--color-surface);
}

/* ===== ドロワーメニューの押した感触（ポチッ） ===== */
.drawer-item {
  transform-origin: left center;
  transition: background-color 120ms ease, color 120ms ease,
    transform 120ms ease, box-shadow 120ms ease;
}
.drawer-item:active {
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  transform: scale(0.98);
}
.drawer-item.is-pressed {
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  transform: scale(0.98);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.10);
}
@media (prefers-reduced-motion: reduce) {
  .drawer-item:active, .drawer-item.is-pressed { transform: none; }
}
.map-pin { transition: transform 100ms ease; }
.leaflet-marker-icon:active .map-pin { transform: rotate(-45deg) scale(0.82); }
.leaflet-control-zoom-in:active, .leaflet-control-zoom-out:active {
  background-color: #e5e7eb !important;
}
@media (prefers-reduced-motion: reduce) {
  button, .bottom-tab-item, .drawer-item, .sub-tab-btn, .map-day-row,
  .calendar-cell, .latest-card, .news-card, .agenda-event-row, .day-event-row,
  .map-pin { transition: none !important; }
}


/* ===== Latest carousel focus ===== */
.latest-scroll {
  padding-top: 8px;
  padding-bottom: 14px;
}
.latest-scroll .latest-card {
  transform: scale(var(--latest-scale, 0.96));
  opacity: var(--latest-opacity, 0.8);
  transform-origin: center center;
  transition: transform 180ms ease-out, opacity 180ms ease-out,
    box-shadow 180ms ease-out, border-color 180ms ease-out;
}
.latest-scroll .latest-card.is-front {
  border-color: var(--color-primary);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
  z-index: 1;
}
.latest-scroll .latest-card:active {
  transform: scale(calc(var(--latest-scale, 1) * 0.97));
}
@media (max-width: 639px) {
  .latest-scroll {
    padding-left: max(16px, calc((100vw - 234px) / 2));
    padding-right: max(16px, calc((100vw - 234px) / 2));
  }
  .latest-scroll .latest-card { scroll-snap-align: center; }
}
@media (min-width: 640px) {
  .latest-scroll .latest-card { scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .latest-scroll .latest-card {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}


/* ===== 今日のイベントにしぼるボタン ===== */
.latest-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.today-filter-btn {
  margin-left: auto;
  flex-shrink: 0;
  border: 1.5px solid var(--color-primary);
  background: var(--color-bg);
  color: var(--color-primary);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.today-filter-btn.active {
  background: var(--color-primary);
  color: #fff;
}
@media (max-width: 380px) {
  .today-filter-btn { font-size: 11px; padding: 6px 9px; }
}
