/* ==========================================================================
   Xiaomi Air Fryer 6.5L (MAF-W6501) Complete Japanese Recipe Book PWA Styles
   Optimized for iPad / Android Tablets (Portrait & Landscape), Mobile, and PC
   ========================================================================== */
:root {
  --bg: #FAF8F5;
  --bg-alt: #F3EFEA;
  --card: #FFFFFF;
  --text: #2C2420;
  --text-sub: #6E625A;
  --accent: #D95D39;
  --accent-dark: #B84A27;
  --accent-soft: #FDECE6;
  --brown: #4A352A;
  --brown-dark: #2C2420;
  --green: #356644;
  --green-soft: #EDF5EF;
  --blue: #275882;
  --blue-soft: #EEF4FA;
  --amber: #C87A19;
  --amber-soft: #FFF9F2;
  --border: #E4DCD2;
  --shadow-sm: 0 2px 8px rgba(44, 36, 32, 0.06);
  --shadow-md: 0 8px 24px rgba(44, 36, 32, 0.12);
  --shadow-lg: 0 16px 40px rgba(44, 36, 32, 0.22);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", "BIZ UDGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.5;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, a {
  font-family: inherit;
  touch-action: manipulation;
}

/* --- Sticky App Header --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #2C2420 0%, #4A352A 70%, #7A3B24 100%);
  color: #FFFFFF;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
  padding: 10px 18px;
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: #F4B08B;
  font-weight: 700;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: #FFFFFF;
}

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

.hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.hdr-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hdr-btn:active {
  transform: scale(0.97);
}

.hdr-btn.accent-btn {
  background: var(--accent);
  border-color: #F28B6D;
}

.hdr-btn.accent-btn:hover {
  background: var(--accent-dark);
}

/* Wake Lock Toggle Pill */
.wakelock-btn.active {
  background: #2D6A43;
  border-color: #6CD490;
  color: #E9FFF0;
}

.wakelock-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9E948E;
  display: inline-block;
}

.wakelock-btn.active .wakelock-dot {
  background: #58F28E;
  box-shadow: 0 0 8px #58F28E;
}

/* --- Control Bar (Search, Categories, Quick Filters) --- */
.controls-section {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 14px 18px 12px;
  box-shadow: var(--shadow-sm);
}

.controls-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.search-box-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--text-sub);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 44px 10px 44px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #FFFFFF;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #E2D9CE;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-clear-btn.visible {
  display: inline-flex;
}

.result-count-badge {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brown);
  white-space: nowrap;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 15px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.cat-tab:hover {
  border-color: #C9BBAE;
  background: #F3ECE3;
}

.cat-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(217, 93, 57, 0.28);
}

.cat-tab-cnt {
  font-size: 0.78rem;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(44, 36, 32, 0.08);
  color: inherit;
}

.cat-tab.active .cat-tab-cnt {
  background: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
}

/* Quick Filters Row */
.quick-filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qf-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-sub);
  margin-right: 2px;
}

.qf-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.qf-chip:hover {
  background: var(--bg);
}

.qf-chip.active {
  background: var(--brown-dark);
  border-color: var(--brown-dark);
  color: #FFFFFF;
}

.qf-chip.fav-chip.active {
  background: #C93B2B;
  border-color: #C93B2B;
  color: #FFFFFF;
}

/* --- Main Recipe Grid --- */
.main-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 18px 110px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 18px;
}

.recipe-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.16s, box-shadow 0.16s;
  position: relative;
  cursor: pointer;
}

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

.rc-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #EDE7DF;
  overflow: hidden;
}

.rc-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s;
}

.recipe-card:hover .rc-thumb {
  transform: scale(1.03);
}

.rc-top-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rc-seq {
  background: rgba(44, 36, 32, 0.86);
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.rc-rec-badge {
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.rc-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #B5ABA3;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.12s, color 0.15s;
  z-index: 2;
}

.rc-fav-btn:active {
  transform: scale(0.9);
}

.rc-fav-btn.active {
  color: #E04332;
  background: #FFFFFF;
}

.rc-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.rc-cat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.rc-cat-pill {
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 6px;
}

.rc-counts {
  color: var(--text-sub);
  font-weight: 600;
}

.rc-title {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.rc-specs {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spec-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.spec-badge.temp {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid #F2C4B4;
}

.spec-badge.time {
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid #C2D8EC;
}

.spec-badge.serv {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #C2DEC9;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #FFFFFF;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--brown);
}

.empty-state p {
  color: var(--text-sub);
  margin-bottom: 16px;
}

/* --- Recipe Detail Modal / Full View --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28, 22, 19, 0.68);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-sheet {
  width: 100%;
  max-width: 1220px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: auto 0;
  border: 1px solid var(--border);
}

.modal-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-btn:hover {
  background: #EFE9E1;
}

.nav-btn.primary {
  background: var(--brown-dark);
  color: #FFFFFF;
  border-color: var(--brown-dark);
}

.modal-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-content {
  padding: 20px;
}

.detail-header-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.dh-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.dh-title {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 14px;
}

.dh-specs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #EFE9E1;
}

.timer-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 8px 16px;
  border-radius: 11px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(217, 93, 57, 0.25);
  transition: transform 0.1s, background 0.15s;
}

.timer-trigger-btn:hover {
  background: var(--accent-dark);
}

.timer-trigger-btn:active {
  transform: scale(0.97);
}

/* Detail 2-column responsive layout for tablets */
.detail-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 20px;
  align-items: start;
}

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

.detail-left-col, .detail-right-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-photos-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-photo-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #EDE7DF;
  cursor: zoom-in;
}

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

.photo-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(44, 36, 32, 0.82);
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
}

.panel-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.panel-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.reset-check-btn {
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-sub);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.reset-check-btn:hover {
  background: #EAE2D8;
  color: var(--text);
}

/* Interactive Ingredient Checklist */
.ing-group-heading {
  background: #F5EFE8;
  color: #8C4328;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 7px;
  margin: 10px 0 6px;
}

.ing-group-heading:first-child {
  margin-top: 0;
}

.ing-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ing-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid #EFE9E1;
  background: #FCFBF9;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}

.ing-check-item:hover {
  border-color: #D9CEC2;
}

.ing-check-item.checked {
  background: #F1EFEA;
  color: #9A8F87;
}

.ing-check-item.checked .ing-name,
.ing-check-item.checked .ing-amount {
  text-decoration: line-through;
  color: #9A8F87;
}

.ing-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.check-box-ui {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid #C5B9AD;
  background: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: transparent;
  transition: all 0.12s;
}

.ing-check-item.checked .check-box-ui,
.step-check-card.checked .check-box-ui {
  background: var(--green);
  border-color: var(--green);
  color: #FFFFFF;
}

.ing-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.ing-amount {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brown);
  text-align: right;
  white-space: nowrap;
}

/* Interactive Step Cards Grid */
.detail-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.detail-steps-grid.no-photos {
  grid-template-columns: 1fr;
}

.step-check-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}

.step-check-card:hover {
  border-color: #C9BBAE;
}

.step-check-card.checked {
  background: #F1EFEA;
  border-color: #D5CEC6;
  opacity: 0.72;
}

.step-check-card.checked .step-desc-text {
  text-decoration: line-through;
  color: #8C827A;
}

.step-photo-box {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #EDE7DF;
  overflow: hidden;
}

.step-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
}

.step-num-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 99px;
}

.step-desc-text {
  padding: 4px 12px 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

/* Tips Box in Detail */
.detail-tips-box {
  background: var(--amber-soft);
  border: 1px solid #F0D9C0;
  border-left: 5px solid #E2923B;
  border-radius: 12px;
  padding: 14px 18px;
}

.detail-tips-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #A65D14;
  margin-bottom: 6px;
}

.detail-tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  color: #4D3F34;
}

.detail-tips-list li::before {
  content: "• ";
  color: #D9822B;
  font-weight: 700;
}

/* --- Floating Built-in Kitchen Timer --- */
.floating-timer {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 300;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: #2C2420;
  color: #FFFFFF;
  border: 2px solid var(--accent);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.floating-timer.visible {
  display: flex;
}

.floating-timer.ringing {
  animation: timerPulse 0.8s infinite alternate;
  border-color: #FFCC00;
}

@keyframes timerPulse {
  0% { background: #2C2420; transform: scale(1); }
  100% { background: #9E2A1B; transform: scale(1.03); }
}

.ft-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ft-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #F4B08B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ft-close-btn {
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: #FFFFFF;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.ft-display-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ft-digits {
  font-size: 2.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.ft-adjust-btns {
  display: flex;
  gap: 6px;
}

.ft-mini-btn {
  min-height: 36px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.ft-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  overflow: hidden;
}

.ft-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s linear;
}

.ft-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ft-ctrl-btn {
  min-height: 44px;
  border-radius: 10px;
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.ft-ctrl-btn.start {
  background: var(--accent);
  color: #FFFFFF;
}

.ft-ctrl-btn.pause {
  background: #E2923B;
  color: #FFFFFF;
}

.ft-ctrl-btn.reset {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

/* --- Guide & Conversion Tables inside Modals --- */
.info-section-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.info-section-card h3 {
  font-size: 1.15rem;
  color: var(--brown-dark);
  border-left: 5px solid var(--accent);
  padding-left: 10px;
  margin-bottom: 14px;
}

.guide-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.guide-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 860px) {
  .guide-2col, .guide-3col {
    grid-template-columns: 1fr;
  }
}

.diagram-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.diagram-box img {
  max-width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}

.web-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.web-table th {
  background: var(--brown);
  color: #FFFFFF;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
}

.web-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.web-table tr:nth-child(even) td {
  background: var(--bg);
}

.status-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  margin-right: 4px;
  margin-bottom: 4px;
}

.status-pill.ok {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #B8D8C0;
}

.status-pill.ng {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid #F2C4B4;
}

/* Image Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
