/* 県立富士見高等学校 PTAアプリ（保護者側）— 現行 GAS 版 index のスタイルを移植 */
:root {
  --navy: #003366;
  --navy-deep: #001e3d;
  --navy-mid: #004488;
  --sky: #E6F0FA;
  --sky-mid: #c8dff5;
  --coral: #FF6F61;
  --white: #ffffff;
  --gray-light: #f4f7fb;
  --gray-mid: #e0e8f0;
  --gray-text: #7a8fa6;
  --text-dark: #1a2a3a;
  --gold: #c8a84b;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(0, 51, 102, .10);
  --shadow-card: 0 2px 16px rgba(0, 51, 102, .08);
  --nav-h: 68px;
  --header-h: 60px;
  --ticker-h: 36px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--gray-light);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
}

/* HEADER */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-deep);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, .3);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.header-logo {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, .15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.header-title-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header-sub {
  font-size: 9px;
  color: rgba(255, 255, 255, .5);
  letter-spacing: .08em;
  font-weight: 300;
  margin-bottom: 2px;
}

.header-school {
  height: 20px;
}

.header-school img {
  height: 100%;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left;
}

.notif-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .1);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  color: white;
  font-size: 17px;
  transition: background .2s;
}

.notif-btn:active {
  background: rgba(255, 255, 255, .2);
}

.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--coral);
  border-radius: 50%;
  font-size: 9px;
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--navy-deep);
}

/* TICKER */
.ticker-wrap {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 100%);
  height: var(--ticker-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: sticky;
  top: var(--header-h);
  z-index: 99;
}

.ticker-label {
  background: var(--coral);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
}

.ticker-inner {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-scroll 22s linear infinite;
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
  padding-left: 100%;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0)
  }

  100% {
    transform: translateX(-50%)
  }
}

/* SCROLL AREA */
.scroll-area {
  height: calc(100dvh - var(--header-h) - var(--ticker-h) - var(--nav-h));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.scroll-area::-webkit-scrollbar {
  display: none;
}

/* PAGE */
.page {
  display: none;
  animation: page-in .3s ease;
}

.page.active {
  display: block;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* HERO */
.hero {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 30, 61, .1) 0%, rgba(0, 30, 61, .45) 60%, rgba(0, 30, 61, .88) 100%);
  z-index: 1;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 111, 97, .9);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
  letter-spacing: .06em;
}

.hero-title {
  color: white;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .4);
  font-family: 'Noto Serif JP', serif;
}

/* SECTIONS */
.section-pad {
  padding: 18px 16px 4px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-text);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-mid);
}

.section-bottom {
  height: 20px;
}

/* QUICK ACTIONS */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.qa-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}

.qa-item:active {
  transform: scale(.92);
}

.qa-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-card);
}

.qa-icon.blue {
  background: linear-gradient(135deg, #003fa3, #0055d4);
  color: white;
}

.qa-icon.coral {
  background: linear-gradient(135deg, #ff5c4d, #ff8a7e);
  color: white;
}

.qa-icon.teal {
  background: linear-gradient(135deg, #008080, #00bfbf);
  color: white;
}

.qa-icon.gold {
  background: linear-gradient(135deg, #b8860b, #daa520);
  color: white;
}

.qa-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.2;
}

/* EVENT SCROLL */
.event-scroll-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 0 -16px;
  padding-left: 16px;
}

.event-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.event-scroll-inner {
  display: flex;
  gap: 12px;
  width: max-content;
  padding-right: 16px;
}

.event-card {
  width: 160px;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}

.event-card:active {
  transform: scale(.97);
  box-shadow: var(--shadow);
}

.event-card-top {
  height: 90px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-card-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  color: white;
  letter-spacing: .05em;
}

.badge-pta {
  background: var(--navy);
}

.badge-school {
  background: var(--coral);
}

.event-card-body {
  padding: 10px 12px;
}

.event-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

/* NEWS */
.news-list {
  padding: 0 16px;
}

.news-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}

.news-card:active {
  transform: scale(.98);
}

.news-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--sky);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.news-body {
  flex: 1;
  min-width: 0;
}

.news-cat {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  margin-bottom: 5px;
  letter-spacing: .05em;
}

.news-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-date {
  font-size: 10px;
  color: var(--gray-text);
}

/* CALENDAR */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: white;
  border-bottom: 1px solid var(--gray-mid);
}

.cal-nav-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--sky);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-month {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-deep);
}

.cal-grid {
  padding: 12px 16px;
  background: white;
  margin: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.cal-daynames {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}

.cal-dayname {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-text);
  padding: 4px 0;
}

.cal-dayname.sun {
  color: var(--coral);
}

.cal-dayname.sat {
  color: #4479c4;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 4px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dark);
  transition: background .15s;
}

.cal-day:active {
  background: var(--sky);
}

.cal-day.other-month {
  color: var(--gray-mid);
}

.cal-day.today {
  background: var(--navy) !important;
  color: white !important;
  border-radius: 50%;
}

.cal-day.sun {
  color: var(--coral);
}

.cal-day.sat {
  color: #4479c4;
}

.day-dots {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.day-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.dot-pta {
  background: var(--navy);
}

.dot-school {
  background: var(--coral);
}

.legend-row {
  display: flex;
  gap: 16px;
  padding: 0 16px 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--gray-text);
  font-weight: 500;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.event-list-section {
  padding: 0 16px;
  margin-top: 4px;
}

.event-list-item {
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
}

.event-list-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.event-list-content {
  flex: 1;
}

.event-list-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.event-list-date {
  font-size: 11px;
  color: var(--gray-text);
}

.rsvp-btn {
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

/* ATTENDANCE */
.attend-page {
  padding: 16px;
}

.attend-event-card {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius);
  padding: 20px;
  color: white;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.attend-event-card::before {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, .05);
  border-radius: 50%;
}

.attend-event-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.attend-event-date {
  font-size: 12px;
  opacity: .75;
  margin-top: 3px;
}

.profile-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--sky), var(--sky-mid));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.profile-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-class {
  font-size: 11px;
  color: var(--gray-text);
}

.profile-edit {
  font-size: 11px;
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.attend-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.attend-btn {
  border: none;
  border-radius: var(--radius);
  padding: 22px 16px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all .2s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: var(--shadow-card);
}

.attend-btn:active {
  transform: scale(.95);
}

.attend-btn.present {
  background: linear-gradient(135deg, #0e7a5e, #00a880);
  color: white;
}

.attend-btn.absent {
  background: linear-gradient(135deg, #c0392b, var(--coral));
  color: white;
}

.attend-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.attend-btn-icon {
  font-size: 28px;
}

.attend-btn-label {
  font-size: 15px;
  letter-spacing: .05em;
}

.attend-done {
  display: none;
  text-align: center;
  padding: 30px 20px;
}

.attend-done-icon {
  font-size: 60px;
  margin-bottom: 16px;
}

.attend-done-text {
  font-size: 18px;
  font-weight: 700;
  font-family: 'Noto Serif JP', serif;
  color: var(--navy-deep);
  margin-bottom: 8px;
}

.attend-done-sub {
  font-size: 13px;
  color: var(--gray-text);
}

.attend-event-card.selected {
  box-shadow: 0 0 0 3px rgba(255, 111, 97, .6), 0 4px 24px rgba(0, 51, 102, .2);
}

/* PHOTO */
.photo-page {
  padding: 16px;
}

#photoEventSelect {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.photo-event-card {
  background: white;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  border: 2px solid transparent;
  width: 100%;
  box-sizing: border-box;
}

.photo-event-card.active {
  border-color: #001e3d;
  background: #f0f7ff;
}

.photo-event-card .card-check {
  display: none;
  color: #001e3d;
  font-size: 18px;
  margin-left: auto;
}

.photo-event-card.active .card-check {
  display: block;
}

.photo-event-card .card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f0f7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.photo-event-card .card-body {
  flex: 1;
  min-width: 0;
}

.photo-event-card .card-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-event-card .card-date {
  font-size: 11px;
  color: #666;
}

.photo-upload-zone {
  border: 2px dashed var(--sky-mid);
  border-radius: var(--radius);
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: white;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 16px;
}

.photo-upload-zone:active {
  border-color: var(--navy);
  background: var(--sky);
}

.photo-upload-icon {
  width: 56px;
  height: 56px;
  background: var(--sky);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--navy);
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.photo-preview-item {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--sky);
  overflow: hidden;
  position: relative;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-send-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 51, 102, .3);
  transition: all .2s;
}

.photo-send-btn:active {
  transform: scale(.98);
}

.upload-progress {
  display: none;
  margin-top: 12px;
}

.progress-bar-wrap {
  background: var(--gray-mid);
  border-radius: 10px;
  height: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--navy-mid));
  width: 0%;
  transition: width .3s;
}

/* DOCS */
.pill-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px 8px;
  overflow-x: auto;
}

.pill-tabs::-webkit-scrollbar {
  display: none;
}

.pill-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--gray-mid);
  background: white;
  color: var(--gray-text);
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}

.pill-tab.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  box-shadow: 0 2px 10px rgba(0, 51, 102, .2);
}

.docs-list {
  padding: 0 16px;
}

/* ピンチアウト対応：資料ページはtouch-actionをautoに */
#page-docs {
  touch-action: auto;
}

#page-docs .scroll-area {
  touch-action: auto;
}

.doc-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform .18s;
}

.doc-card:active {
  transform: scale(.98);
}

.doc-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.doc-body {
  flex: 1;
  min-width: 0;
}

.doc-cat {
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 2px;
}

.doc-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-meta {
  font-size: 10px;
  color: var(--gray-text);
}

/* ピンチアウト時のスクロール固定を防ぐ */
#page-docs {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.doc-card iframe {
  touch-action: auto;
}

.inquiry-banner {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  border-radius: var(--radius);
  padding: 20px;
  margin: 12px 16px 20px;
}

/* MYPAGE */
.mypage {
  padding: 16px;
}

.mypage-hero {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  border-radius: var(--radius);
  padding: 24px 20px;
  color: white;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.mypage-hero::before {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, .04);
  border-radius: 50%;
}

.mypage-avatar {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, .15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 10px;
}

.mypage-name {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Noto Serif JP', serif;
}

.mypage-class {
  font-size: 12px;
  opacity: .7;
  margin-top: 2px;
}

.mypage-section {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}

.mypage-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-mid);
  transition: background .15s;
}

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

.mypage-item:active {
  background: var(--sky);
}

.menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* BOTTOM NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: white;
  border-top: 1px solid var(--gray-mid);
  display: flex;
  align-items: stretch;
  z-index: 200;
  box-shadow: 0 -4px 24px rgba(0, 51, 102, .10);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  padding-top: 6px;
  border: none;
  background: transparent;
  font-family: inherit;
}

.nav-item:active {
  opacity: .7;
}

.nav-icon {
  font-size: 20px;
  color: var(--gray-text);
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
}

.nav-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--gray-text);
  letter-spacing: .05em;
  transition: color .2s;
}

.nav-item.active .nav-icon {
  color: var(--navy);
  transform: translateY(-2px) scale(1.1);
}

.nav-item.active .nav-label {
  color: var(--navy);
}

.nav-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 28px;
  height: 3px;
  background: var(--navy);
  border-radius: 0 0 3px 3px;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.nav-item.active .nav-indicator {
  transform: translateX(-50%) scaleX(1);
}

/* NOTIFICATION POPUP */
.notif-popup {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}

.notif-popup.visible {
  pointer-events: all;
  opacity: 1;
}

.notif-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 20, 40, .5);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.notif-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.34, 1.1, .64, 1);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.notif-popup.visible .notif-panel {
  transform: translateY(0);
}

.notif-panel-head {
  background: var(--navy-deep);
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.notif-panel-title {
  font-size: 15px;
  font-weight: 700;
}

.notif-close {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, .15);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
}

.notif-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--gray-light);
  cursor: pointer;
}

.notif-item.unread {
  background: #eef5ff;
  border-left: 3px solid var(--navy);
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy);
  flex-shrink: 0;
  margin-top: 5px;
}

.notif-item:not(.unread) .notif-dot {
  opacity: 0;
}

.notif-item-text {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 3px;
}

.notif-item-time {
  font-size: 10px;
  color: var(--gray-text);
}

/* GUIDE SLIDE PANEL */
.slide-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}

.slide-overlay.visible {
  pointer-events: all;
  opacity: 1;
}

.slide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 20, 40, .5);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.slide-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius) var(--radius) 0 0;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.34, 1.05, .64, 1);
  overflow: hidden;
}

.slide-overlay.visible .slide-panel {
  transform: translateY(0);
}

.slide-handle {
  width: 36px;
  height: 4px;
  background: var(--gray-mid);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.slide-head {
  padding: 14px 20px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--gray-mid);
}

.slide-title {
  font-size: 17px;
  font-weight: 700;
  font-family: 'Noto Serif JP', serif;
  color: var(--navy-deep);
}

.slide-body {
  overflow-y: auto;
  flex: 1;
  padding: 16px 20px;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.guide-card {
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all .2s cubic-bezier(.34, 1.56, .64, 1);
  border: 1px solid var(--gray-mid);
}

.guide-card:active {
  transform: scale(.95);
  background: var(--sky);
}

.guide-emoji {
  font-size: 28px;
  margin-bottom: 8px;
}

.guide-name {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}

.guide-sub {
  font-size: 10px;
  color: var(--gray-text);
}

/* SETUP MODAL */
.setup-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 20, 40, .7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.setup-overlay.hidden {
  display: none;
}

.setup-panel {
  background: white;
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 390px;
  padding: 28px 24px 40px;
}

.setup-title {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Noto Serif JP', serif;
  color: var(--navy-deep);
  margin-bottom: 6px;
}

.setup-sub {
  font-size: 13px;
  color: var(--gray-text);
  margin-bottom: 20px;
  line-height: 1.6;
}

.setup-field {
  margin-bottom: 16px;
}

.setup-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  display: block;
}

.setup-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-mid);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-dark);
  outline: none;
  transition: border-color .2s;
  background: var(--gray-light);
}

.setup-input:focus {
  border-color: var(--navy);
  background: white;
}

.setup-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
}

/* 種別タブ */
.user-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.user-type-tab {
  flex: 1;
  padding: 10px 6px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--gray-mid);
  background: white;
  color: var(--gray-text);
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  text-align: center;
}

.user-type-tab.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

/* COLOR BLOCKS */
.dummy-autumn {
  background: linear-gradient(135deg, #f5a76b, #c85a1e);
}

.dummy-spring {
  background: linear-gradient(135deg, #a8d8a8, #5fa85f);
}

.dummy-blue {
  background: linear-gradient(135deg, #a8c8f8, #3a7bd5);
}

.dummy-pink {
  background: linear-gradient(135deg, #f8c8d4, #e0608a);
}

.dummy-purple {
  background: linear-gradient(135deg, #c8b4e8, #7c4dcc);
}

/* LOADING */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--navy-deep);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity .4s;
}

.loading-overlay.done {
  opacity: 0;
  pointer-events: none;
}

.loading-logo {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, .1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.loading-title {
  color: white;
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .1em;
}

.loading-sub {
  color: rgba(255, 255, 255, .5);
  font-size: 11px;
  letter-spacing: .15em;
}

.loading-bar-wrap {
  width: 120px;
  height: 3px;
  background: rgba(255, 255, 255, .15);
  border-radius: 3px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: var(--coral);
  border-radius: 3px;
  animation: loading-fill 1.8s ease forwards;
}

@keyframes loading-fill {
  0% {
    width: 0%
  }

  100% {
    width: 100%
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.05)
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0)
  }

  20% {
    transform: translateX(-6px)
  }

  40% {
    transform: translateX(6px)
  }

  60% {
    transform: translateX(-4px)
  }

  80% {
    transform: translateX(4px)
  }
}

/* HELP */
.help-card {
  background: white;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.help-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background .15s;
}

.help-card-head:active {
  background: var(--sky);
}

.help-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-card-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.help-card-arrow {
  color: var(--gray-text);
  font-size: 12px;
  transition: transform .25s;
}

.help-card-arrow.open {
  transform: rotate(180deg);
}

.help-card-body {
  padding: 0 16px 14px;
  border-top: 1px solid var(--gray-mid);
}

.help-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dark);
}

.help-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.help-note {
  background: var(--gray-light);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--gray-text);
  line-height: 1.6;
}

.help-qa {
  background: white;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.help-q {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: background .15s;
}

.help-q:active {
  background: var(--sky);
}

.help-a {
  padding: 0 16px 13px;
  font-size: 12px;
  color: var(--gray-text);
  line-height: 1.7;
  border-top: 1px solid var(--gray-mid);
}

/* ===== Cloudflare 版での追加 ===== */
.header-banner {
  display: block;
  height: 48px;
  width: auto;
  max-width: calc(100vw - 80px);
  object-fit: contain;
  object-position: left center;
}

.ticker-wrap.is-empty {
  display: none;
}
