/* ==========================================================
   마트랑계산기 Glassmorphism & Soft Coral Theme (30대 여성 타겟)
   ========================================================== */

:root {
  --main-soft-coral: #FF8A80;
  --main-coral-hover: #FF6F61;
  --main-coral-dark: #E53935;
  --sub-pastel-mint: #A7F3D0;
  --sub-mint-dark: #059669;
  --mint-bg-light: #ECFDF5;
  --bg-cream-light: #FFF9F8;
  --bg-cream-gradient: linear-gradient(135deg, #FFF9F8 0%, #F5FAf8 50%, #FFF5F2 100%);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-hover: rgba(255, 255, 255, 0.8);
  --glass-border: 1px solid rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 10px 30px rgba(255, 138, 128, 0.08), 0 4px 16px rgba(0, 0, 0, 0.02);
  --text-primary: #2D3748;
  --text-secondary: #64748B;
  --text-coral: #E53E3E;
  --radius-card: 22px;
  --radius-btn: 14px;
  --radius-pill: 50px;
}

body {
  background: var(--bg-cream-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'GmarketSansTTFMedium', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}

/* Base Wrapper */
.wrap {
  max-width: 680px;
  width: 94%;
  margin: 0 auto;
}

/* Header Styling */
header.header-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--glass-border);
  box-shadow: 0 4px 20px rgba(255, 138, 128, 0.06);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-title-box {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-title-box img {
  height: 34px;
  width: auto;
  margin: 0;
  padding: 0;
  filter: drop-shadow(0 2px 4px rgba(255, 138, 128, 0.3));
}

.header-title-box h1 {
  margin: 0;
  padding: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  letter-spacing: -0.5px;
}

.header-title-box h1 .sub-tag {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--main-coral-dark);
  opacity: 0.9;
}

.header-actions {
  display: flex;
  gap: 6px;
}

.header-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 138, 128, 0.25);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.header-btn:hover, .header-btn:active {
  background: var(--main-soft-coral);
  color: #fff;
  border-color: var(--main-soft-coral);
  transform: translateY(-1px);
}

/* Category Navigation (Horizontal Scroll Tabs) */
.nav-wrapper.glass-nav {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 4px 0 !important;
  margin: 12px auto !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 680px !important;
  box-sizing: border-box !important;
}

.scroll-view {
  flex: 1 !important;
  overflow-x: auto !important;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
  white-space: nowrap !important;
  padding: 4px 0 !important;
}

.scroll-view::-webkit-scrollbar {
  display: none !important; /* Chrome/Safari */
}

.options-list {
  display: inline-flex !important;
  gap: 8px !important;
  padding: 0 2px !important;
  align-items: center !important;
}

.option-item {
  position: relative !important;
  flex-shrink: 0 !important;
}

.option-item input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

.option-item label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 10px 18px !important;
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 25px !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #475569 !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03) !important;
  user-select: none !important;
  white-space: nowrap !important;
}

.option-item label:hover {
  background: #E2E8F0 !important;
  color: #1E293B !important;
}

.option-item input[type="radio"]:checked + label,
.option-item.active label {
  background: linear-gradient(135deg, #FF4D4D 0%, #FF6B4A 100%) !important;
  color: #FFFFFF !important;
  border-color: #FF3333 !important;
  box-shadow: 0 4px 16px rgba(255, 77, 77, 0.45) !important;
  transform: scale(1.02) !important;
}

.nav-btn {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  color: #334155 !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
  z-index: 5 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
}

.nav-btn:hover {
  background: #FFFFFF !important;
  color: #FF4D4D !important;
  border-color: #FF4D4D !important;
  box-shadow: 0 6px 16px rgba(255, 77, 77, 0.25) !important;
  transform: scale(1.08) !important;
}

.nav-btn:active {
  transform: scale(0.95) !important;
}

/* Main Calculator Section & Glass Cards */
.calc-section {
  display: none;
}

.calc-section.on {
  display: block;
  animation: fadeIn 0.35s ease-out;
}

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

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 16px;
}

/* Input Fields Styling */
.input-box {
  border: none;
  padding: 0;
  margin: 0;
}

.input-box legend {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--main-coral-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-group-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-row label {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-wrapper input[type="number"],
.input-wrapper input[type="text"] {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(255, 138, 128, 0.25);
  border-radius: var(--radius-btn);
  padding: 0 65px 0 16px;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.input-wrapper input:focus {
  border-color: var(--main-soft-coral);
  box-shadow: 0 0 0 4px rgba(255, 138, 128, 0.15);
  background: #FFFFFF;
}

.input-addon-group {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-reset-btn {
  background: rgba(255, 138, 128, 0.12);
  color: var(--main-coral-dark);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s;
}

.input-reset-btn:hover {
  background: rgba(255, 138, 128, 0.25);
}

.input-unit-label, .input-unit-select {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--main-coral-dark);
}

.input-unit-select {
  background: var(--mint-bg-light);
  border: 1px solid var(--sub-pastel-mint);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--sub-mint-dark);
  outline: none;
  cursor: pointer;
}

/* Quick Increment Buttons */
.quick-preset-bar {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.quick-chip {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 138, 128, 0.2);
  color: var(--text-secondary);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-chip:hover, .quick-chip:active {
  background: var(--main-soft-coral);
  color: #fff;
  border-color: var(--main-soft-coral);
}

/* CTA Calculate Button */
.cta-calc-button {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #FF8A80 0%, #FF6F61 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 1.65rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 18px;
  box-shadow: 0 8px 20px rgba(255, 138, 128, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cta-calc-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 138, 128, 0.45);
}

.cta-calc-button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(255, 138, 128, 0.3);
}

/* Result Box Styling */
.result-glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(236, 253, 245, 0.6) 100%);
  border: 1.5px solid var(--sub-pastel-mint);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(167, 243, 208, 0.15);
}

.result-glass-card legend {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sub-mint-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.result-content-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-content-list p {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(167, 243, 208, 0.4);
}

.result-content-list p .res-val,
.result-content-list p .result-val,
.result-content-list p > span {
  margin-left: auto;
  text-align: right;
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
}

.result-content-list p .res-val span,
.result-content-list p .result-val span,
.result-content-list p > span span {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--main-coral-dark);
}

/* Dynamic Category Phrase Banner (Coupang Compare Area) */
.dynamic-ad-banner {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 138, 128, 0.35);
  box-shadow: 0 8px 24px rgba(255, 138, 128, 0.1);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.25s ease;
}

.dynamic-ad-banner:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--main-soft-coral);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 138, 128, 0.2);
}

.dynamic-phrase-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dynamic-phrase-box .highlight-tag {
  background: linear-gradient(135deg, #FF8A80, #FF6F61);
  color: #fff;
  font-size: 1.15rem;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.bounce-arrow {
  display: inline-block;
  font-size: 1.6rem;
  color: var(--main-coral-dark);
  animation: bounceDown 1.3s infinite ease-in-out;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Coupang Integration Container */
.coupang-glass-section {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-card);
  padding: 20px;
  margin: 16px 0;
  text-align: center;
}

.coupang-section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--main-coral-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.coupang-iframe-wrapper {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  background: #ffffff;
  padding: 8px;
  margin-bottom: 14px;
}

.coupas-notice {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-top: 10px;
  margin-bottom: 0;
}

/* Floating Action Button (FAB) - Camera OCR Product Recognition */
.fab-camera-container {
  position: fixed;
  bottom: 144px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fab-camera-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: 2px solid #FFFFFF;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  outline: none;
}

.fab-camera-btn svg, .fab-camera-btn img {
  width: 28px;
  height: 28px;
}

.fab-camera-btn:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.6);
}

.fab-camera-btn:active {
  transform: scale(0.95);
}

.fab-label-tag {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 138, 128, 0.3);
  color: var(--main-coral-dark);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  white-space: nowrap;
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 4px 16px rgba(255, 138, 128, 0.15); }
  50% { box-shadow: 0 6px 20px rgba(255, 138, 128, 0.35); }
}

/* Mobile Thumb Zone Hide/Show adjustments - Hide on PC/Desktop */
@media (min-width: 1025px) {
  .fab-camera-container {
    display: none !important;
  }
  #header-camera-btn {
    display: none !important;
  }
}

/* Scanning Overlay & Spinner */
.ocr-scanning-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 20;
  backdrop-filter: blur(4px);
}

.ocr-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #10B981;
  border-radius: 50%;
  animation: spinOCR 0.8s linear infinite;
}

@keyframes spinOCR {
  to { transform: rotate(360deg); }
}

.ocr-status-text {
  color: #FFFFFF;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* Camera Modal Styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 12px;
  padding-top: max(16px, env(safe-area-inset-top, 16px));
  padding-bottom: max(32px, env(safe-area-inset-bottom, 32px));
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

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

.camera-modal-card {
  background: #FFFFFF;
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  padding: 22px 20px 40px 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  max-height: min(86dvh, calc(100vh - 60px));
  max-height: min(86vh, calc(100vh - 60px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin: auto 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--sub-pastel-mint, #38BDF8) rgba(0, 0, 0, 0.05);
}

/* Thin sleek UI-themed scrollbar for camera modal */
.camera-modal-card::-webkit-scrollbar {
  width: 6px;
  display: block;
}

.camera-modal-card::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  margin: 6px 0;
}

.camera-modal-card::-webkit-scrollbar-thumb {
  background: var(--sub-pastel-mint, #38BDF8);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.camera-modal-card::-webkit-scrollbar-thumb:hover {
  background: #0284C7;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.7rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.camera-privacy-notice {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notice-badge {
  font-size: 1.12rem;
  font-weight: 700;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notice-list {
  margin: 0;
  padding-left: 18px;
  font-size: 1.02rem;
  color: #475569;
  line-height: 1.45;
}

.notice-list li {
  margin-bottom: 3px;
}

.notice-list li:last-child {
  margin-bottom: 0;
}

.notice-list strong {
  color: #1E293B;
}

.camera-viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 260px;
  max-height: 340px;
  background: radial-gradient(circle at center, #1E293B 0%, #0F172A 100%);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  transition: filter 0.15s ease;
}

.camera-viewfinder.shutter-flash {
  filter: brightness(1.7) contrast(1.2);
}

.camera-viewfinder video {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.viewfinder-simulation {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  pointer-events: none;
}

.viewfinder-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

.viewfinder-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84%;
  height: 56%;
  border: 2px dashed var(--sub-pastel-mint);
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  display: none;
  justify-content: center;
  box-sizing: border-box;
}

.camera-viewfinder.camera-active .viewfinder-frame {
  display: block;
}

.viewfinder-guide-badge {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.5);
  padding: 6px 14px;
  border-radius: 9999px;
  white-space: nowrap;
  letter-spacing: -0.2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10;
  box-sizing: border-box;
  pointer-events: none;
}

.viewfinder-guide-badge .guide-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.viewfinder-guide-badge .guide-text {
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.viewfinder-guide-badge-bottom {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.5);
  padding: 6px 14px;
  border-radius: 9999px;
  white-space: nowrap;
  letter-spacing: -0.2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10;
  box-sizing: border-box;
  pointer-events: none;
}

.viewfinder-guide-badge-bottom .guide-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.viewfinder-guide-badge-bottom .guide-text {
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

/* Shutter Camera Button & Album Button Styling */
.camera-btn-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  scroll-margin-top: 8px;
}

.btn-shutter-capture {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 50%, #B91C1C 100%);
  border: 2px solid #FCA5A5;
  border-radius: var(--radius-pill);
  color: #FFFFFF;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.38);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  scroll-margin-top: 8px;
}

.btn-shutter-capture:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.5);
  background: linear-gradient(135deg, #F87171 0%, #DC2626 60%, #991B1B 100%);
}

.btn-shutter-capture:active {
  transform: scale(0.97);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
}

.shutter-svg-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
  transition: transform 0.2s ease;
}

.btn-shutter-capture:hover .shutter-svg-icon {
  transform: scale(1.08);
}

.shutter-label {
  letter-spacing: -0.3px;
}

.btn-album-select {
  width: 100%;
  height: 44px;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  color: #334155;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-album-select:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #0F172A;
}

.btn-album-select:active {
  transform: scale(0.98);
  background: #E2E8F0;
}

.ocr-result-box {
  background: var(--bg-cream-light);
  border: 1.5px solid rgba(255, 138, 128, 0.3);
  border-radius: 16px;
  padding: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  scroll-margin-top: 16px;
}

@keyframes ocrBoxPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 112, 67, 0.45);
    border-color: rgba(255, 112, 67, 0.9);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 112, 67, 0.18);
    border-color: #FF7043;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 112, 67, 0);
    border-color: rgba(255, 138, 128, 0.3);
  }
}

.ocr-result-box.highlight-pulse {
  animation: ocrBoxPulse 1.1s ease-out;
}

.ocr-result-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.ocr-text-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--main-coral-dark);
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.ocr-text-input.ocr-processing-text {
  color: #0284C7;
  background: rgba(224, 242, 254, 0.65);
  border-color: #38BDF8;
  font-style: italic;
  animation: ocrProcessingPulse 1.4s infinite ease-in-out;
}

@keyframes ocrProcessingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.quick-sample-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.sample-tag {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 1.15rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.sample-tag:hover {
  background: var(--mint-bg-light);
  color: var(--sub-mint-dark);
  border-color: var(--sub-pastel-mint);
}

.modal-action-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-search-coupang {
  background: linear-gradient(135deg, #0055D3 0%, #003399 100%);
  color: #FFFFFF;
  border: none;
  padding: 14px;
  border-radius: var(--radius-btn);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 85, 211, 0.3);
}

.btn-apply-calc {
  background: var(--mint-bg-light);
  color: var(--sub-mint-dark);
  border: 1px solid var(--sub-pastel-mint);
  padding: 12px;
  border-radius: var(--radius-btn);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
}

.coupas-notice {
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
  margin-top: 10px;
  margin-bottom: 0px !important;
  padding-bottom: 0px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.camera-perm-revoke-wrap {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  margin-bottom: 4px;
}

.btn-perm-revoke {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: #64748B;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.btn-perm-revoke:hover {
  background: #E2E8F0;
  color: #334155;
  border-color: #94A3B8;
}

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

.btn-perm-revoke svg {
  color: #94A3B8;
}

.perm-guide-card {
  max-width: 440px !important;
  gap: 14px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1.5px solid rgba(255, 138, 128, 0.3) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25) !important;
}

.perm-guide-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.perm-guide-desc {
  font-size: 1.15rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.perm-guide-item {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 12px;
}

.perm-guide-title {
  margin-bottom: 4px;
}

.guide-tag {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.chrome-tag {
  background: #E0F2FE;
  color: #0284C7;
}

.samsung-tag {
  background: #EDE9FE;
  color: #7C3AED;
}

.safari-tag {
  background: #FEF3C7;
  color: #D97706;
}

.perm-guide-steps {
  font-size: 1.1rem;
  color: #334155;
  line-height: 1.5;
}

.btn-perm-guide-ok {
  background: linear-gradient(135deg, #FF8A80 0%, #FF6F61 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 111, 97, 0.3);
}

.btn-perm-guide-ok:hover {
  filter: brightness(1.05);
}

@media (max-width: 640px) {
  .modal-overlay {
    padding: 10px 8px max(24px, env(safe-area-inset-bottom, 24px)) 8px;
    align-items: flex-start;
  }

  .camera-modal-card {
    max-height: min(85dvh, calc(100vh - 40px));
    max-height: min(85vh, calc(100vh - 40px));
    padding: 16px 14px 50px 14px;
    gap: 12px;
    border-radius: 20px;
    margin: 6px auto 24px auto;
  }

  .camera-viewfinder {
    aspect-ratio: 4 / 3;
    min-height: 180px;
    max-height: 240px;
  }

  .viewfinder-frame::after {
    font-size: 1.05rem;
    padding: 3px 10px;
    top: 6px;
  }
}

/* Footer & Mini Calc Modal overrides */
footer {
  margin-top: 30px;
  margin-bottom: 20px;
  text-align: center;
}

footer .footer-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: var(--glass-border);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--glass-shadow);
}

/* ==========================================================
   MODAL POPUP OVERHAUL & REDESIGN (Mini Calc, Notice, Manual)
   ========================================================== */

body.modal-open {
  overflow: hidden !important;
}

.ct-wrap,
.notice-container,
.manual-container,
.history-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  margin: 0 !important;
  transform: none !important;
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 10005 !important;
  display: none !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 16px 12px !important;
  padding-top: max(16px, env(safe-area-inset-top, 16px)) !important;
  padding-bottom: max(32px, env(safe-area-inset-bottom, 32px)) !important;
  box-sizing: border-box !important;
  opacity: 0;
  pointer-events: none;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* Hide scrollbar completely across browsers */
.ct-wrap::-webkit-scrollbar,
.notice-container::-webkit-scrollbar,
.manual-container::-webkit-scrollbar,
.history-container::-webkit-scrollbar,
.ct-modal-box::-webkit-scrollbar,
.notice-box::-webkit-scrollbar,
.manual-box::-webkit-scrollbar,
.history-box::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.ct-wrap.open,
.notice-container.open,
.manual-container.open,
.history-container.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

/* Modal Inner Boxes */
.ct-modal-box,
.notice-box,
.manual-box,
.history-box {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
  border-radius: 28px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 138, 128, 0.2) !important;
  position: relative !important;
  width: 100% !important;
  max-width: 440px !important;
  padding: 24px 22px 36px 22px !important;
  box-sizing: border-box !important;
  max-height: min(86dvh, calc(100vh - 50px)) !important;
  max-height: min(86vh, calc(100vh - 50px)) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin: auto 0 !important;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.ct-wrap.open .ct-modal-box,
.notice-container.open .notice-box,
.manual-container.open .manual-box,
.history-container.open .history-box {
  transform: scale(1) !important;
}

.notice-box, .manual-box, .history-box {
  max-width: 520px !important;
}

/* Modal Title Header */
.modal-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 138, 128, 0.2);
}

.modal-title-bar .modal-icon {
  font-size: 2rem;
}

.modal-title-bar .modal-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Close Button in Modal Box */
.btn-close-b {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(255, 138, 128, 0.1) !important;
  border: 1px solid rgba(255, 138, 128, 0.2) !important;
  color: var(--main-coral-dark) !important;
  font-size: 1.8rem !important;
  font-weight: 300 !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 10;
}

.btn-close-b:hover {
  background: var(--main-soft-coral) !important;
  color: #FFFFFF !important;
  transform: scale(1.08) rotate(90deg) !important;
}

/* Mini Calculator Redesign & Compact Centered Layout */
.ct-mini-calc-box {
  width: 100% !important;
  max-width: 320px !important;
  margin: auto !important;
  padding: 16px !important;
  border-radius: 24px !important;
  box-sizing: border-box !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
}

.mini-calc-close-btn {
  position: absolute !important;
  top: 5px !important;
  right: 10px !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: #F1F5F9 !important;
  border: 1px solid #CBD5E1 !important;
  color: #475569 !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 10 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06) !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.mini-calc-close-btn:hover {
  background: #FF8A80 !important;
  color: #FFFFFF !important;
  border-color: #FF8A80 !important;
  transform: scale(1.1) !important;
}

.mini_calc_calculator {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.mini_calc_display {
  width: 100% !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%) !important;
  border: 2px solid rgba(255, 138, 128, 0.3) !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  font-size: 2.4rem !important;
  font-weight: 800 !important;
  color: #4ADE80 !important;
  text-align: right !important;
  word-break: break-all !important;
  min-height: 38px !important;
  box-shadow: inset 0 3px 10px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.05) !important;
  font-family: 'Pretendard', system-ui, -apple-system, sans-serif !important;
  margin-top: 18px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.mini_calc_display.limit-warning {
  border-color: #ff8277 !important;
  box-shadow: inset 0 3px 10px rgba(0,0,0,0.5), 0 0 12px rgba(255, 130, 119, 0.6) !important;
}

.mini_calc_buttons {
  width: 100% !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
}

.mini_calc_btn {
  height: 48px !important;
  background: #FFFFFF !important;
  border: 1.5px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 14px !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #1E293B !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04) !important;
}

.mini_calc_btn:hover {
  background: #F8FAFC !important;
  border-color: rgba(255, 138, 128, 0.4) !important;
  transform: translateY(-1px) !important;
}

.mini_calc_btn:active {
  transform: scale(0.95) !important;
  background: #E2E8F0 !important;
}

.mini_calc_operator {
  background: #ECFDF5 !important;
  color: #059669 !important;
  border-color: #A7F3D0 !important;
}

.mini_calc_operator:hover {
  background: #D1FAE5 !important;
}

.mini_calc_clear {
  background: #FFF1F2 !important;
  color: #E11D48 !important;
  border-color: #FECDD3 !important;
}

.mini_calc_clear:hover {
  background: #FFE4E6 !important;
}

.mini_calc_equal {
  background: linear-gradient(135deg, #FF8A80 0%, #FF5252 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 6px 18px rgba(255, 82, 82, 0.4) !important;
}

.mini_calc_equal:hover {
  background: linear-gradient(135deg, #FF6F61 0%, #E53935 100%) !important;
}

/* Notice & Manual Board Items Redesign (Unified) */
.notice-board, .manual-board {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.notice-item, .manual-item {
  background: #FFFFFF !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
  transition: all 0.2s ease !important;
}

.notice-item:hover, .manual-item:hover {
  border-color: rgba(255, 138, 128, 0.4) !important;
  box-shadow: 0 6px 20px rgba(255, 138, 128, 0.12) !important;
  transform: translateY(-2px) !important;
}

.notice-header, .manual-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 16px !important;
  cursor: pointer !important;
  gap: 12px !important;
}

.header-text-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.notice-date, .manual-date {
  background: #F1F5F9 !important;
  color: #64748B !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  width: fit-content !important;
}

.notice-title, .manual-title {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: #1E293B !important;
  line-height: 1.4 !important;
}

.toggle-icon-wrap {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  color: #64748B !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  font-size: 1.1rem !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
}

.notice-header.active .toggle-icon-wrap,
.manual-header.active .toggle-icon-wrap {
  transform: rotate(180deg) !important;
  background: var(--main-soft-coral) !important;
  color: #FFFFFF !important;
  border-color: var(--main-soft-coral) !important;
  box-shadow: 0 3px 8px rgba(255, 138, 128, 0.35) !important;
}

.notice-content, .manual-content {
  padding: 16px 18px !important;
  background: #F8FAFC !important;
  border-top: 1px solid #E2E8F0 !important;
  color: #334155 !important;
  font-size: 1.3rem !important;
  line-height: 1.65 !important;
}

/* Pagination Links */
#pagination-container, #pagination2-container {
  display: flex !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-top: 20px !important;
}

.page-link {
  padding: 6px 14px !important;
  border-radius: 20px !important;
  border: 1px solid #E2E8F0 !important;
  background: #FFFFFF !important;
  color: #64748B !important;
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.page-link:hover {
  background: #F8FAFC !important;
  color: var(--main-coral-dark) !important;
  border-color: rgba(255, 138, 128, 0.4) !important;
}

.page-link.active {
  background: linear-gradient(135deg, #FF8A80 0%, #FF5252 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(255, 82, 82, 0.3) !important;
}

/* ==========================================================
   HAMBURGER BUTTON & DRAWER MODAL POPUP STYLES
   ========================================================== */

/* Hamburger Button in Header */
.hamburger-btn {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1.5px solid rgba(255, 138, 128, 0.3) !important;
  border-radius: 12px !important;
  width: 42px !important;
  height: 42px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  box-shadow: 0 2px 8px rgba(255, 138, 128, 0.12) !important;
}

.hamburger-btn:hover {
  background: var(--main-soft-coral) !important;
  border-color: var(--main-soft-coral) !important;
  transform: scale(1.05) !important;
}

.hamburger-btn span {
  display: block !important;
  width: 20px !important;
  height: 2.5px !important;
  background-color: var(--main-coral-dark) !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
}

.hamburger-btn:hover span {
  background-color: #FFFFFF !important;
}

/* Drawer Backdrop Overlay */
.drawer-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 10000 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.drawer-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Drawer Menu Modal Popup Container */
.drawer-menu {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  width: 380px !important;
  max-width: 90vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-left: 1.5px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 138, 128, 0.15) !important;
  z-index: 10001 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto !important;
  padding: 24px 20px !important;
  box-sizing: border-box !important;
  transform: translateX(100%) !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s !important;
}

body.drawer-open {
  overflow: hidden !important;
}

.drawer-menu::-webkit-scrollbar {
  width: 5px;
}

.drawer-menu::-webkit-scrollbar-track {
  background: transparent;
}

.drawer-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 138, 128, 0.3);
  border-radius: 10px;
}

.drawer-menu.active {
  transform: translateX(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Drawer Header */
.drawer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 14px !important;
  margin-bottom: 16px !important;
  border-bottom: 1.5px solid rgba(255, 138, 128, 0.18) !important;
}

.drawer-logo-box {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
}

.drawer-logo-box img {
  height: 48px !important;
  max-width: 220px !important;
  width: auto !important;
  margin: 0 0 0 -4px !important;
  padding: 0 !important;
  display: block !important;
  filter: drop-shadow(0 2px 4px rgba(255, 138, 128, 0.2)) !important;
}

.drawer-close-btn {
  background: rgba(255, 138, 128, 0.1) !important;
  border: 1px solid rgba(255, 138, 128, 0.2) !important;
  color: var(--main-coral-dark) !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  font-size: 1.8rem !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}

.drawer-close-btn:hover {
  background: var(--main-soft-coral) !important;
  color: #FFFFFF !important;
  transform: scale(1.08) rotate(90deg) !important;
}

/* Drawer Nav Items List */
.drawer-nav-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
}

.drawer-nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 18px !important;
  background: #FFFFFF !important;
  border: 1.5px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 16px !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  color: #1E293B !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
}

.drawer-nav-item .nav-icon {
  font-size: 1.6rem !important;
}

.drawer-nav-item:hover {
  background: var(--bg-cream-light) !important;
  border-color: rgba(255, 138, 128, 0.5) !important;
  color: var(--main-coral-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(255, 138, 128, 0.15) !important;
}

/* Lotto Box inside Drawer */
.drawer-lotto-box {
  background: linear-gradient(135deg, #FFF9F8 0%, #FFF0ED 100%) !important;
  border: 1.5px solid rgba(255, 138, 128, 0.3) !important;
  border-radius: 20px !important;
  padding: 18px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 4px 14px rgba(255, 138, 128, 0.08) !important;
  text-align: center !important;
}

.drawer-lotto-title {
  font-size: 1.4rem !important;
  font-weight: 800 !important;
  color: #1E293B !important;
  margin-bottom: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.drawer-lotto-sub {
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  color: #64748B !important;
  margin-bottom: 12px !important;
  text-align: center !important;
  line-height: 1.4 !important;
}

/* Banners inside Drawer */
.drawer-banners {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.drawer-banner-card {
  width: 100% !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  background: #FFFFFF !important;
}

.drawer-banners .drawer-banner-card:last-child,
.drawer-banner-card:has(#gtm-banner-mp) {
  margin-bottom: 100px !important;
}

.drawer-banner-card img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  border-radius: 16px !important;
}

.coupang-disclaimer {
  font-size: 1.1rem !important;
  color: #64748B !important;
  text-align: center !important;
  margin-top: 6px !important;
  line-height: 1.3 !important;
  word-break: keep-all !important;
}

/* Oil Price Card & Fuel Buttons Styles */
.oil-price-card {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1.5px solid rgba(255, 138, 128, 0.25) !important;
  border-radius: 18px !important;
  padding: 16px !important;
  margin: 14px 0 !important;
  box-shadow: 0 4px 16px rgba(255, 138, 128, 0.08) !important;
}

.price-date-title {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #1E293B !important;
  margin-bottom: 12px !important;
  text-align: center !important;
}

.price-date-title #priceDate {
  color: var(--main-coral-dark) !important;
  font-weight: 800 !important;
}

#fuelPriceGroup {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
}

.fuel-row {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
}

.fuel-row > .fuel-button,
.fuel-button {
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 11px 14px !important;
  background: #FFFFFF !important;
  border: 1.5px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 14px !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #334155 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
  min-height: 46px !important;
  white-space: nowrap !important;
}

.fuel-button:hover {
  border-color: rgba(255, 138, 128, 0.5) !important;
  background: #FFF8F7 !important;
  transform: translateY(-2px) !important;
}

.fuel-button.fuel-selected {
  background: linear-gradient(135deg, #FFF0ED 0%, #E8F5F7 100%) !important;
  border-color: var(--main-soft-coral) !important;
  color: var(--main-coral-dark) !important;
  box-shadow: 0 4px 12px rgba(255, 138, 128, 0.2) !important;
}

.fuel-button span[id^="price-"] {
  font-weight: 800 !important;
  color: var(--sub-mint-dark) !important;
  margin-left: 2px !important;
}

.fuel-button.fuel-selected span[id^="price-"] {
  color: var(--main-coral-dark) !important;
}

.price-hint-text {
  font-size: 1.1rem !important;
  color: #64748B !important;
  text-align: center !important;
  margin-top: 10px !important;
  font-weight: 600 !important;
}

/* Calculator Add Button & Remove Button Styles */
.btn-add {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  margin-top: 12px !important;
  padding: 10px 16px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1.5px dashed var(--main-soft-coral) !important;
  border-radius: 12px !important;
  color: var(--main-coral-dark) !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(255, 138, 128, 0.08) !important;
}

.btn-add:hover {
  background: #FFF0ED !important;
  border-style: solid !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(255, 138, 128, 0.18) !important;
}

.btn-add:active {
  transform: translateY(0) !important;
}

.calc-section {
  position: relative !important;
}

.btn-remove {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 10 !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  border: 1px solid #FFCDD2 !important;
  background: #FFEBEE !important;
  color: #D32F2F !important;
  font-size: 1.4rem !important;
  font-weight: bold !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.btn-remove:hover {
  background: #FFCDD2 !important;
  transform: scale(1.1) !important;
}

/* ==========================================================
   Main Custom Scrollbar Styling (Glass & Soft Coral Theme)
   ========================================================== */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--main-soft-coral) rgba(255, 245, 242, 0.6);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 245, 242, 0.6);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 138, 128, 0.7) 0%, rgba(255, 111, 97, 0.85) 100%);
  border-radius: 10px;
  border: 2px solid rgba(255, 245, 242, 0.6);
  background-clip: padding-box;
  transition: all 0.25s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #FF8A80 0%, #FF6F61 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

::-webkit-scrollbar-thumb:active {
  background: #E53935;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* ==========================================================
   Calculation History Specific Styles
   ========================================================== */
.history-title-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 18px !important;
  padding-bottom: 12px !important;
  padding-right: 32px !important;
  border-bottom: 1px solid rgba(255, 138, 128, 0.2) !important;
}

.modal-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-clear-history {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-clear-history:hover {
  background: #ef4444;
  color: #ffffff;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 2px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.history-list::-webkit-scrollbar {
  display: none !important;
}

/* History Card */
.history-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 138, 128, 0.22);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(255, 138, 128, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 138, 128, 0.15);
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.history-card-badge {
  background: var(--mint-bg-light);
  color: var(--sub-mint-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.history-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-card-date {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.history-card-del {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}

.history-card-del:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.history-card-body {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.history-card-inputs {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.history-card-inputs .label,
.history-card-results .label {
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
}

.history-card-results {
  font-weight: 600;
  color: var(--text-primary);
}

.history-card-results strong {
  color: var(--main-coral-dark);
  font-weight: 700;
}

/* History Empty State */
.history-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  border: 1px dashed rgba(255, 138, 128, 0.3);
}

.history-empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
  opacity: 0.85;
}

.history-empty-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text-primary);
}

.history-empty-sub {
  font-size: 0.82rem;
  margin: 0;
  color: var(--text-secondary);
}

/* ==========================================================
   Bottom Action Section (PWA & Social Share)
   ========================================================== */
.bottom-action-section {
  max-width: 580px;
  margin: 28px auto 18px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.pwa-install-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.pwa-installed .pwa-install-wrapper,
.pwa-install-wrapper.is-hidden,
body.pwa-installed .pwa-install-wrapper {
  display: none !important;
}

@media all and (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  .pwa-install-wrapper {
    display: none !important;
  }
}

.btn-pwa-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  height: 46px !important;
  line-height: 46px !important;
  padding: 0 20px !important;
  background-color: #70d3ff !important;
  background: #70d3ff !important;
  color: #0f172a !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(112, 211, 255, 0.45) !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.btn-pwa-install:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(112, 211, 255, 0.6) !important;
  background-color: #52c5fc !important;
  background: #52c5fc !important;
}

.btn-pwa-install:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(112, 211, 255, 0.3) !important;
}

.btn-pwa-install .pwa-icon {
  font-size: 1.2rem;
}

/* Share Section */
.share-btn-group {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
}

.btn-share-item {
  flex: 1;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 46px !important;
  line-height: 46px !important;
  padding: 0 16px !important;
  margin-top: 0 !important;
  border-radius: 14px !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  border: none !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
  text-decoration: none !important;
}

.btn-share-item span {
  text-align: center;
  width: 100%;
}

#gtm-share-katalk {
  background-color: #FEE500 !important;
  background-image: none !important;
  color: #191919 !important;
}

#gtm-share-katalk:hover {
  background-color: #fada0a !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(254, 229, 0, 0.4) !important;
}

#gtm-share-naver {
  background-color: #03CF5D !important;
  background-image: none !important;
  color: #ffffff !important;
}

#gtm-share-naver:hover {
  background-color: #02b852 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(3, 207, 93, 0.35) !important;
}

.share-icon-img {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
  object-fit: cover !important;
}


