/* --------------------------------------------------
   Core Design System & Tokens
-------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --primary-color: #005bac; /* 道新ブルー */
  --primary-light: #e6f0fa;
  --primary-dark: #003c73;
  
  --color-stop: #e63946;    /* 一時停止用の赤系 */
  --color-resume: #2a9d8f;  /* 再開用の緑系 */
  --color-address: #457b9d; /* 住所変更の青系 */
  --color-inquiry: #e9c46a; /* お問い合わせの黄・金系 */
  --color-sales: #f4a261;   /* 物販のオレンジ系 */
  
  --bg-color: #f5f7fb;
  --card-bg: #ffffff;
  --text-main: #2b2d42;
  --text-muted: #8d99ae;
  --border-color: #edf2f7;
  
  /* Fonts */
  --font-main: 'Noto Sans JP', sans-serif;
  --font-eng: 'Outfit', sans-serif;
  
  /* Shadows & Layout */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: #1a1a24;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* --------------------------------------------------
   Smartphone Device Mockup Container
-------------------------------------------------- */
.device-container {
  position: relative;
  width: 412px;
  height: 846px;
  background: #000;
  border-radius: 48px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 12px #222;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition-normal);
}

/* Desktop orientation and responsiveness helper */
@media (max-width: 480px), (max-height: 860px) {
  body {
    background-color: var(--bg-color);
  }
  .device-container {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  .device-notch, .device-speaker {
    display: none !important;
  }
}

/* Top Notch & Speaker */
.device-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 30px;
  background-color: #000;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  z-index: 9999;
}

.device-speaker {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background: #333;
  border-radius: 2px;
}

/* App View Wrapper */
.app-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  .app-wrapper {
    border-radius: 0;
  }
}

/* Status Bar Simulator */
.status-bar {
  height: 40px;
  padding: 12px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-eng);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--bg-color);
  z-index: 1000;
  user-select: none;
}

.status-bar-icons {
  display: flex;
  gap: 6px;
}

/* --------------------------------------------------
   App Headers & Layout
-------------------------------------------------- */
.app-header {
  padding: 8px 16px 12px;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

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

.app-logo-bg {
  width: 32px;
  height: 32px;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-eng);
  font-weight: 800;
  font-size: 18px;
}

.app-title-wrapper {
  display: flex;
  flex-direction: column;
}

.app-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.app-subtitle {
  font-size: 10px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bell-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.bell-btn:hover {
  background-color: var(--primary-light);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background-color: var(--color-stop);
  border-radius: 50%;
  border: 1.5px solid var(--card-bg);
}

/* App Body Scroll Area */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 70px; /* Space for bottom navigation */
  position: relative;
  scrollbar-width: none;
}

.app-content::-webkit-scrollbar {
  display: none;
}

/* Tab Views */
.tab-view {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.tab-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------
   Home Page Components
-------------------------------------------------- */
/* Banner/Hero Slider Simulator */
.hero-slider {
  margin: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-md);
  padding: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-slider::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero-tag {
  font-family: var(--font-eng);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
}

.hero-mascot {
  position: absolute;
  bottom: -15px;
  right: -5px;
  width: 110px;
  height: 110px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.15));
}

/* Button Grid for Core 8 Actions */
.button-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.action-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.action-btn:active {
  transform: scale(0.96);
}

.btn-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: #fff;
  transition: transform var(--transition-normal);
}

.action-btn:hover .btn-icon-wrapper {
  transform: rotate(5deg) scale(1.05);
}

/* Icon specific background colors */
.bg-stop { background: linear-gradient(135deg, #ff5f6d, #ffc371); }
.bg-resume { background: linear-gradient(135deg, #11998e, #38ef7d); }
.bg-address { background: linear-gradient(135deg, #2193b0, #6dd5ed); }
.bg-inquiry { background: linear-gradient(135deg, #f857a6, #ff5858); }
.bg-magazine { background: linear-gradient(135deg, #8a2387, #e94057, #f27121); }
.bg-recruit { background: linear-gradient(135deg, #1f4068, #162447); }
.bg-sales { background: linear-gradient(135deg, #f12711, #f5af19); }
.bg-quit { background: linear-gradient(135deg, #3a3d40, #181719); }

.btn-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

/* Home Highlights / Cards */
.section-header {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.section-link {
  font-size: 11px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

/* Flyer Card */
.flyer-card {
  margin: 0 16px 20px;
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.flyer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.flyer-img-container {
  height: 130px;
  position: relative;
  overflow: hidden;
}

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

.flyer-card:hover .flyer-img-container img {
  transform: scale(1.05);
}

.flyer-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--color-stop);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.flyer-info {
  padding: 12px;
}

.flyer-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.flyer-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* Service Card (見守り) */
.service-card {
  margin: 0 16px 20px;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.service-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.service-card-info {
  flex: 1;
}

.service-card-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.service-card-desc {
  font-size: 10px;
  color: #1e3a8a;
  line-height: 1.3;
}

.service-card-arrow {
  color: var(--primary-color);
}

/* Distribution shop Footer */
.shop-footer {
  background-color: #edf2f7;
  padding: 24px 16px 40px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
}

.shop-footer-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.shop-footer-details {
  line-height: 1.6;
  margin-bottom: 12px;
}

.shop-footer-contact {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.shop-footer-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------
   Form Shell & Dynamic Sliding Panel
-------------------------------------------------- */
.form-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.form-panel.active {
  transform: translateX(0);
}

.form-header {
  padding: 12px 16px;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  padding: 4px;
}

.form-panel-title {
  font-size: 14px;
  font-weight: 800;
}

.form-header-right {
  width: 48px; /* balancing back button */
}

/* Wizard Steps Indicator */
.form-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  gap: 8px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-family: var(--font-eng);
  font-weight: 700;
}

.step-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

.step-divider {
  flex: 1;
  max-width: 30px;
  height: 2px;
  background-color: var(--border-color);
}

.step-item.active .step-num {
  background-color: var(--primary-color);
  color: #fff;
}

.step-item.active .step-label {
  color: var(--primary-color);
}

.step-item.completed .step-num {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* Form Content Container */
.form-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Form Inputs Grouping */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.label-required {
  background-color: #fee2e2;
  color: #ef4444;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
}

.label-optional {
  background-color: #f3f4f6;
  color: #6b7280;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
}

.form-input {
  width: 100%;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--font-main);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 91, 172, 0.1);
}

.form-textarea {
  resize: none;
  height: 80px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234b5563' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

/* Date Row */
.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Buttons for Forms */
.form-footer-btn-wrapper {
  padding: 16px;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
}

.submit-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.submit-btn:active {
  transform: scale(0.98);
}

/* Confirm Section details */
.confirm-list {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.confirm-item {
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
}

.confirm-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.confirm-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.confirm-val {
  font-size: 13px;
  font-weight: 700;
}

/* Success Panel View */
.success-view {
  text-align: center;
  padding: 30px 16px;
}

.success-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #ecfdf5;
  color: var(--color-resume);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 10px rgba(42, 157, 143, 0.15);
}

.success-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
}

.success-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

/* --------------------------------------------------
   Special Form UIs (Community Magazine, Flyers, Coupons)
-------------------------------------------------- */
/* Magazine Viewer (電子書籍めくり風モーダル) */
.magazine-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 15, 0.95);
  z-index: 2000;
  display: none;
  flex-direction: column;
}

.magazine-modal.active {
  display: flex;
}

.magazine-modal-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.close-modal-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.magazine-modal-title {
  font-size: 13px;
  font-weight: 700;
}

.magazine-booklet {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  perspective: 1000px;
}

.booklet-container {
  width: 280px;
  height: 380px;
  background-color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-radius: 4px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform var(--transition-slow);
}

.booklet-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  padding: 16px;
  box-shadow: inset 4px 0 10px rgba(0,0,0,0.05);
  backface-visibility: hidden;
  transition: transform var(--transition-slow);
  transform-origin: left center;
  overflow: hidden;
}

.booklet-page.cover-page {
  z-index: 10;
}

.booklet-page.page-2 {
  transform: rotateY(-180deg);
  z-index: 5;
}

.booklet-page img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 12px;
}

.page-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-text {
  font-size: 9.5px;
  color: #555;
  line-height: 1.5;
}

.booklet-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.booklet-nav-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.booklet-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.booklet-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* --------------------------------------------------
   Announcements (お知らせ) & Coupons
-------------------------------------------------- */
.announcement-list {
  padding: 16px;
}

.announce-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.announce-item:hover {
  transform: translateY(-1px);
}

.announce-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.announce-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
}

.tag-critical { background-color: var(--color-stop); }
.tag-normal { background-color: var(--primary-color); }
.tag-shop { background-color: var(--color-resume); }

.announce-date {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-eng);
}

.announce-title {
  font-size: 12px;
  font-weight: 700;
}

/* Simulated Push Notification floating bar */
.push-notification-banner {
  position: absolute;
  top: 50px;
  left: 16px;
  right: 16px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.05);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateY(-200%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.push-notification-banner.active {
  transform: translateY(0);
}

.push-app-icon {
  width: 24px;
  height: 24px;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-eng);
  font-size: 13px;
  font-weight: 900;
}

.push-content {
  flex: 1;
}

.push-header {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.push-title {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
}

.push-body {
  font-size: 10.5px;
  color: #444;
  line-height: 1.3;
}

/* Coupon Items */
.coupon-list {
  padding: 16px;
}

.coupon-item {
  background: linear-gradient(135deg, #fffcf6, #fff);
  border: 2px dashed #fcd34d;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.coupon-item::before, .coupon-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background-color: var(--bg-color);
  border-radius: 50%;
  left: -8px;
  border-right: 1px solid #fcd34d;
}

.coupon-item::before { top: 20%; }
.coupon-item::after { bottom: 20%; }

.coupon-details {
  flex: 1;
  padding-left: 12px;
}

.coupon-title {
  font-size: 13px;
  font-weight: 800;
  color: #d97706;
  margin-bottom: 4px;
}

.coupon-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.coupon-btn {
  background-color: #f59e0b;
  color: #fff;
  border: none;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.coupon-btn:hover {
  background-color: #d97706;
}

/* --------------------------------------------------
   My Page Form Configuration
-------------------------------------------------- */
.mypage-hero {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
}

.mypage-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: #fff;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.mypage-userinfo {
  flex: 1;
}

.mypage-username {
  font-size: 14px;
  font-weight: 700;
}

.mypage-usersub {
  font-size: 10px;
  color: var(--text-muted);
}

/* --------------------------------------------------
   Recruitment (配達員募集) Layout
-------------------------------------------------- */
.recruit-hero-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.recruit-content {
  padding: 16px;
}

.recruit-points {
  margin: 12px 0 20px;
}

.recruit-point-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #444;
}

.recruit-point-icon {
  color: var(--color-resume);
}

/* --------------------------------------------------
   物販 (Goods sales) Catalog UI
-------------------------------------------------- */
.sales-catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}

.product-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.product-img {
  height: 90px;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  position: relative;
  font-weight: 700;
}

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

.product-details {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-stop);
  font-family: var(--font-eng);
  margin-top: auto;
  margin-bottom: 8px;
}

.add-cart-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  font-size: 10px;
  font-weight: 700;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

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

/* Cart overlay floating icon */
.cart-floating-btn {
  position: absolute;
  bottom: 80px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-sales);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 1200;
  border: none;
  transition: transform var(--transition-fast);
  transform: scale(0);
}

.cart-floating-btn.active {
  transform: scale(1);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--color-stop);
  color: #fff;
  font-family: var(--font-eng);
  font-size: 9px;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--card-bg);
}

/* --------------------------------------------------
   Bottom Tab Navigation
-------------------------------------------------- */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: 8px; /* space for phone home indicator */
}

.nav-item {
  background: none;
  border: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-item:hover {
  color: var(--primary-color);
}

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

.nav-label {
  font-size: 9px;
  font-weight: 700;
}

/* --------------------------------------------------
   FAX Printable Preview sheet
-------------------------------------------------- */
.fax-sheet {
  background-color: #fff;
  border: 2px solid #000;
  padding: 30px;
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
  font-family: var(--font-main);
  color: #000;
  display: none;
}

.fax-sheet.active {
  display: block;
}

.fax-title {
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  border-bottom: 2px double #000;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.fax-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.fax-table th, .fax-table td {
  border: 1px solid #000;
  padding: 10px;
  text-align: left;
  font-size: 11px;
}

.fax-table th {
  background-color: #f0f0f0;
  width: 30%;
}

.fax-notes {
  margin-top: 30px;
  font-size: 10px;
  border: 1px solid #000;
  padding: 10px;
}

@media print {
  body * {
    visibility: hidden;
  }
  .fax-sheet, .fax-sheet * {
    visibility: visible;
  }
  .fax-sheet {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
  }
}

/* --------------------------------------------------
   Welcome Registration Overlay
-------------------------------------------------- */
.welcome-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 26, 36, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.welcome-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.welcome-card {
  background-color: var(--card-bg);
  width: 100%;
  max-height: 90%;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  scrollbar-width: none;
}

.welcome-card::-webkit-scrollbar {
  display: none;
}

