@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap');

/* =========================================
   1. Global Variables & Reset
   ========================================= */
:root {
    --bg-color: #f0f2f5;
    --main-color: #2c5e46;
    --accent-color: #d4af37;
    --text-color: #343a40;
    --light-gray: #dee2e6;
    --white-color: #ffffff;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --sub-title-color: #8B0000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* 접근성 및 유틸리티 */
button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    padding-top: 10px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================
   2. Animations (Keyframes)
   ========================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes breath {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes jellyPop {
    0% { transform: scale(1); }
    30% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

@keyframes jellyPopLogo {
    0% { opacity: 0; transform: scale(0.5); }
    60% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes softFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dotElastic {
    0% { opacity: 0; transform: translateX(-50%) scale(0); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.8); }
    100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4); }
    70% { box-shadow: 0 0 0 4px rgba(39, 174, 96, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(241, 196, 15, 0); }
    100% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

@keyframes letterFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes flashAlert {
    0% { background-color: #fff5f5; border-top-color: #ffcccc; }
    50% { background-color: #ffe0e0; border-top-color: #ff6b6b; box-shadow: inset 0 0 15px rgba(255, 0, 0, 0.1); }
    100% { background-color: #fff5f5; border-top-color: #ffcccc; }
}

@keyframes drawHighlighter {
    from { background-size: 0% 100%; }
    to { background-size: 100% 100%; }
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* =========================================
   3. Loading, Error & Intro Screens
   ========================================= */
/* Intro Screen */
.intro-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--main-color);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out, visibility 1s;
}
.intro-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-content { text-align: center; padding-bottom: 20vh; }
.intro-logo {
    width: 130px; height: auto; margin-bottom: 1rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
    opacity: 0; transform: scale(0.5);
    animation: jellyPopLogo 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.intro-title {
    color: white; font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; letter-spacing: -0.5px;
    opacity: 0; animation: softFadeIn 1s ease-out 0.6s forwards;
}
.intro-sub { font-size: 1rem; font-weight: 400; margin-left: 8px; opacity: 0.9; }
.intro-text {
    color: rgba(255, 255, 255, 0.9); font-size: 1rem; font-weight: 400; letter-spacing: 2px;
    opacity: 0; animation: softFadeIn 1s ease-out 1.2s forwards; position: relative;
}
.pop-dot { position: relative; display: inline-block; }
.pop-dot::after {
    content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%) scale(0);
    width: 5px; height: 5px; background-color: #d91111; border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 77, 77, 0.5); opacity: 0;
    animation: dotElastic 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.pop-dot:nth-child(1)::after { animation-delay: 1.6s; }
.pop-dot.delay::after { animation-delay: 1.75s; }

/* Loading Screen */
.loading-screen {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    background-color: var(--main-color);
    z-index: 9999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; }
.loading-logo {
    width: 120px; height: auto; margin-bottom: 40px; margin-left: auto; margin-right: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    animation: breath 3s infinite ease-in-out !important; /* 강제 적용 */
    display: block;
}
.loader {
    width: 40px; height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite; margin-bottom: 20px;
}
.loading-screen p {
    color: rgba(255, 255, 255, 0.9); font-size: 0.95rem; font-weight: 300; letter-spacing: 1px;
    margin-top: 10px; animation: fadeInUp 1s ease-out;
}
.custom-loader {
    width: 48px; height: 48px; border: 5px solid #fff0ec; border-bottom-color: #ff5722;
    border-radius: 50%; display: inline-block; box-sizing: border-box; animation: spin 1s linear infinite;
}

/* Error Screen */
.error-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #fff;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 9999; opacity: 0; animation: fadeIn 0.5s forwards;
}
.error-content { text-align: center; padding: 2.5rem 2rem; max-width: 380px; width: 85%; background: #fff; }
.error-logo { width: 80px; height: auto; margin-bottom: 1.5rem; opacity: 0.9; }
.error-title { font-size: 1.4rem; font-weight: 700; color: #2c3e50; margin-bottom: 1.5rem; }
.error-message-box { margin-bottom: 2rem; }
.error-desc {
    font-size: 0.95rem; color: #555; line-height: 1.7; word-break: keep-all;
    background-color: #fcfcfc; padding: 1.5rem; border-radius: 15px; border: 1px solid #f0f0f0;
}
.error-contact-area { margin-bottom: 2.5rem; }
.contact-msg { font-size: 0.8rem; color: #999; margin-bottom: 0.5rem; }
.contact-link-btn {
    display: inline-block; color: #666; text-decoration: none; font-size: 0.9rem; font-weight: 500;
    padding: 0.5rem 1rem; border-radius: 20px; background-color: #f5f5f5; transition: all 0.2s;
}
.contact-link-btn:hover { background-color: #ffeaea; color: #d63031; }
.btn-retry-luxury {
    background-color: #d63031; color: #fff; border: none; padding: 1rem 3rem;
    border-radius: 50px; font-size: 1rem; font-weight: bold; cursor: pointer;
    box-shadow: 0 5px 15px rgba(214, 48, 49, 0.3); transition: transform 0.2s, box-shadow 0.2s;
}
.btn-retry-luxury:hover { background-color: #c0392b; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(214, 48, 49, 0.4); }
.btn-retry-luxury:active { transform: scale(0.98); }

/* =========================================
   4. Login Section
   ========================================= */
.login-screen {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--main-color) 0%, #1e3f30 100%);
    padding: 1.5rem;
}
.login-card {
    background: white; border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 2rem; width: 100%; max-width: 400px; text-align: center;
}
.welcome-logo { width: 80px; height: auto; margin: 0 auto 1rem auto; display: block; animation: none !important; }
.login-title { font-size: 1.8rem; font-weight: 700; color: var(--main-color); margin-bottom: 0.5rem; line-height: 1.2; }
.login-subtitle { color: #666; margin-bottom: 1.5rem; font-size: 0.95rem; }
.sub-title-small { display: block; font-size: 0.6em; color: var(--sub-title-color); font-weight: 500; margin-top: 0.2rem; line-height: 1.2; }

/* Social Login Buttons */
.social-login-btn {
    border: none; border-radius: 6px; padding: 0 1rem; height: 48px;
    font-weight: 600; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    width: 100%; position: relative; font-family: 'Noto Sans KR', sans-serif;
}
.social-login-btn::before {
    content: ''; display: block; width: 24px; height: 24px; position: absolute;
    left: 1rem; top: 50%; transform: translateY(-50%); background-repeat: no-repeat; background-position: center; background-size: contain;
}
.social-login-btn.kakao { background-color: #FEE500; color: #191919; }
.social-login-btn.kakao::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%233C1E1E' d='M12 3C7.58 3 4 5.79 4 9.24c0 2.13 1.37 4.01 3.43 5.13l-.7 2.55c-.12.44.41.77.76.48l3.04-2.02c.47.06.95.1 1.47.1 4.42 0 8-2.79 8-6.24S16.42 3 12 3z'/%3E%3C/svg%3E");
}
.social-login-btn.google { background-color: #ffffff; color: #191919; border: 1px solid #e0e0e0; }
.social-login-btn.google::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E");
}
.social-login-btn.naver { background-color: #03C75A; color: #ffffff; }
.social-login-btn.naver::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M16.398 14.814l-5.94-8.465H6v11.303h4.457V9.188l5.94 8.465h4.457V6.349h-4.457v8.465z'/%3E%3C/svg%3E");
    width: 20px; height: 20px;
}

/* =========================================
   5. Layout (Header, Footer, Status Bar)
   ========================================= */
/* Status Top Bar */
.status-top-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 0rem; padding-bottom: 0.5rem; border-bottom: 1px solid #f0f0f0; margin-bottom: 0px;
    font-family: 'Noto Sans KR', sans-serif; font-size: 0.85rem; color: #666;
}
.status-left { display: flex; align-items: center; gap: 6px; }
.store-status-dot {
    width: 8px; height: 8px; background-color: #27ae60; border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2); animation: pulseGreen 2s infinite;
}
.store-status-text { font-weight: 500; color: #2c3e50; font-size: 0.8rem; }
.status-right { display: flex; align-items: center; gap: 10px; }
.bar-divider { color: #e0e0e0; font-size: 0.7rem; }
.weather-widget { display: flex; align-items: center; gap: 4px; color: #777; }
.weather-icon { font-size: 1rem; }
.weather-location { margin-right: 2px; font-weight: 500; }
.live-clock { display: flex; gap: 8px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
#clockDate { color: #888; font-weight: 400; }
#clockTime { color: #333; font-weight: 600; }

/* Header */
header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; background: white; padding: 1rem 1.2rem;
    border-radius: 12px; box-shadow: var(--card-shadow);
}
.header-left h1 { font-size: 1.4rem; font-weight: 700; color: var(--main-color); margin: 0; line-height: 1.2; }
.header-right { display: flex; align-items: center; gap: 0.8rem; }
.user-info { text-align: right; }
.user-name {
    font-weight: 600; color: var(--main-color); font-size: 0.95rem;
    position: relative; display: inline-block; z-index: 1; text-decoration: none;
}
.user-name::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 40%;
    background-color: rgba(144, 238, 144, 0.6); z-index: -1;
    transform: scaleX(0); transform-origin: bottom left; transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
.user-name:hover::after { transform: scaleX(1); }
.company-name { font-size: 0.8rem; color: #666; margin-right: 0.3rem; }
.history-btn {
    background: var(--main-color); color: white; border: none; padding: 0.4rem 0.8rem;
    border-radius: 6px; cursor: pointer; font-size: 0.85rem; transition: background 0.2s; white-space: nowrap;
}
.history-btn:hover { background: #1e3f30; }

/* Footer */
.app-footer {
    padding: 2rem 1rem; text-align: center; width: 100%;
    background-color: #2c3e50; color: #ecf0f1; margin-top: auto; font-size: 0.8rem;
}
.footer-menu { margin-bottom: 1rem; }
.footer-text-btn { background: none; border: none; color: #bdc3c7; cursor: pointer; font-size: 0.85rem; padding: 0 0.5rem; }
.footer-text-btn:hover { color: white; text-decoration: underline; }
.business-info { line-height: 1.6; color: #95a5a6; margin-bottom: 1rem; }
.business-info strong { color: #bdc3c7; }
.business-info a { color: #95a5a6; text-decoration: none; }
.separator { margin: 0 5px; color: #555; }
.footer-security { margin-top: 0.3rem; color: #a4b0ab; font-size: 0.75rem; display: flex; justify-content: center; align-items: center; gap: 0.4rem; }
.footer-actions { margin-bottom: 1.5rem; margin-top: 1.5rem; }
.logout-btn {
    background: var(--white-color); color: var(--main-color); border: 1px solid #ccc;
    padding: 0.6rem 1.5rem; border-radius: 50px; cursor: pointer; font-size: 0.9rem; font-weight: 600;
    transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); max-width: 180px; width: 100%;
}
.logout-btn:hover { background: #f0f0f0; transform: translateY(-1px); }
.footer-copyright { color: #a4b0ab; font-size: 0.75rem; letter-spacing: 0.02em; margin-top: 0.5rem; }

/* =========================================
   6. Main Order UI (Menu, Items)
   ========================================= */
#mainScreen { display: flex; flex-direction: column; min-height: 100vh; width: 100%; }
.order-section {
    background: white; padding: 1.2rem; border-radius: 12px;
    margin-bottom: 1.5rem; box-shadow: var(--card-shadow);
}
.order-header { margin-bottom: 1rem; border-bottom: 2px solid #f1f1f1; padding-bottom: 0.8rem; }
.order-header h2 { font-size: 1.3rem; color: var(--main-color); }
.sub-header-text { font-size: 0.9rem; color: #888; font-weight: normal; margin-left: 0.5rem; }

/* Categories */
.menu-categories {
    display: flex; flex-wrap: nowrap; overflow-x: visible; width: 100%; gap: 0.5rem;
    margin-bottom: 1rem; padding-bottom: 0.5rem; -webkit-overflow-scrolling: touch;
}
.menu-categories::-webkit-scrollbar { display: none; }
.category-btn {
    flex: 1; text-align: center; padding: 0.5rem 0.9rem; background: #f8f9fa;
    border: 1px solid var(--light-gray); border-radius: 8px; cursor: pointer;
    transition: all 0.2s; font-size: 0.9rem; white-space: nowrap; flex-shrink: 0;
}
.category-btn.active { background: var(--main-color); color: white; border-color: var(--main-color); }

/* Menu Items (Grid) */
.menu-items {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem; margin-bottom: 1rem;
}
.menu-item-card {
    background: #fff; border: 1px solid var(--light-gray); border-radius: 8px;
    padding: 0.6rem 0.4rem; text-align: center; cursor: pointer; transition: all 0.2s;
    display: flex; flex-direction: column; justify-content: space-between; height: 100%;
}
.menu-item-card:hover { background: #f8f9fa; transform: translateY(-1px); border-color: var(--main-color); }
.menu-item-card.selected { border-color: var(--accent-color); background: #fff9e6; }
.menu-item-card:focus, .option-card:focus { outline: 2px solid var(--main-color); outline-offset: 2px; }
.menu-item-name { font-weight: 500; margin-bottom: 0.3rem; font-size: 0.9rem; word-break: keep-all; line-height: 1.3; }
.menu-item-price { color: var(--main-color); font-weight: 700; font-size: 0.90rem; }
.small-paren {
    font-size: 0.8em; color: #666; font-weight: 400; display: block;
    word-break: break-all; white-space: normal; line-height: 1.3;
}
.menu-text-wrap { display: flex; flex-direction: column; justify-content: center; line-height: 1.3; }
.main-text { font-weight: 600; color: #333; font-size: 0.95rem; word-break: break-all; }
.sub-text { font-size: 0.8rem; color: #888; margin-top: 2px; font-weight: 400; }

/* Wide View (Sets) */
.menu-items.wide-view { grid-template-columns: 1fr !important; gap: 0.8rem; }
.menu-items.wide-view .menu-item-card {
    flex-direction: row; justify-content: space-between; align-items: center;
    padding: 1.2rem 1.5rem; text-align: left; min-height: 80px;
}
.menu-items.wide-view .menu-item-name {
    margin-bottom: 0; font-size: 1.1rem; flex: 1; padding-right: 15px; word-break: keep-all; line-height: 1.4;
}
.menu-items.wide-view .small-paren { display: block; margin-top: 4px; color: #666; font-size: 0.85em; font-weight: normal; }
.menu-items.wide-view .menu-item-price { font-size: 1.2rem; white-space: nowrap; font-weight: 800; }

/* Sold Out Styling */
.menu-item-card.sold-out {
    position: relative; opacity: 0.7; pointer-events: none; background-color: #e9ecef;
    border-color: #ccc; filter: grayscale(100%);
}
.sold-out-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-10deg);
    border: 2px solid #c0392b; color: #c0392b; font-weight: 900; font-size: 1.1rem;
    padding: 4px 8px; border-radius: 8px; z-index: 5; white-space: nowrap;
    background: rgba(255, 255, 255, 0.8); pointer-events: none;
}

/* Options */
.option-selection { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--light-gray); }
.option-categories { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.beverage-options, .addon-options { flex: 1; min-width: 150px; }
.option-category-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: #666; }
#beverageItems, #addonItems { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.4rem; }
.option-card {
    background: #f0f4f8; border: 1px solid #d1e0e6; border-radius: 6px;
    padding: 0.5rem 0.2rem; font-size: 0.8rem; text-align: center; cursor: pointer;
    transition: all 0.2s; word-break: keep-all;
}
.option-card.selected { background: var(--accent-color); color: white; border-color: var(--accent-color); }
.option-card.disabled { background: #f5f5f5; color: #aaa; cursor: not-allowed; border-color: #ddd; }

/* =========================================
   7. Cart & Selected Items
   ========================================= */
.selected-items {
    margin-top: 1.5rem; padding: 1rem; background: #f9fbfd;
    border-radius: 8px; border: 1px solid #e1e4e8;
}
.selected-items-header { font-size: 1rem; font-weight: 700; color: var(--main-color); margin-bottom: 0.8rem; }
.selected-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 0.5rem; background: white; margin: 0.4rem 0;
    border-radius: 6px; border: 1px solid #e9ecef; flex-wrap: nowrap; gap: 10px;
}
.selected-item-main { font-weight: 700; font-size: 0.95rem; }
.selected-item-option { margin-left: 1rem; font-size: 0.85rem; color: #555; background: #f8f9fa; border: none; }
.item-info-left { flex: 1; display: flex; align-items: flex-start; min-width: 0; }
.opt-prefix { margin-right: 4px; color: #aaa; }
.item-info-right {
    display: flex; align-items: center; gap: 12px; flex-shrink: 0;
    min-width: 140px; justify-content: flex-end;
}
.quantity-editable {
    cursor: pointer; padding: 0 4px; display: inline-block; min-width: 24px; text-align: center; margin-right: 4px;
    background: linear-gradient(to top, rgba(144, 238, 144, 0.5) 40%, transparent 40%); font-weight: 700; margin-left: 4px;
}
.quantity-edit-input {
    width: 40px !important; padding: 2px !important; height: 26px; font-size: 0.9rem; text-align: center;
    border: 1px solid var(--main-color); border-radius: 4px; background-color: white; display: inline-block;
}
.item-price-text {
    width: 80px; text-align: right; font-size: 0.95rem; font-weight: bold; color: var(--main-color); white-space: nowrap;
}
.btn-del-item {
    background: #f1f3f5; color: #adb5bd; border-radius: 50%; width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
    line-height: 1; padding-bottom: 2px; border: 1px solid transparent; transition: all 0.2s; cursor: pointer;
}
.btn-del-item:hover { background: #ff6b6b; color: white; border-color: #fa5252; }
.total-amount {
    font-size: 1.2rem; font-weight: 700; color: var(--main-color); text-align: right;
    margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--light-gray);
}

/* Floating Bar */
.order-floating-bar {
    position: sticky; bottom: 1rem; left: 0; right: 0; margin: 0 1rem;
    background: transparent; pointer-events: none; z-index: 90;
}
.order-floating-content {
    pointer-events: auto; background: var(--main-color); color: white; border-radius: 50px;
    padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); cursor: pointer; transition: transform 0.2s;
    width: 100%; border: none; font-family: inherit; font-size: 1rem;
}
.order-floating-content:active { transform: scale(0.98); }
.order-floating-content.disabled { background: #888; cursor: not-allowed; }

/* =========================================
   8. Modals System (Complex)
   ========================================= */
/* Base Modal */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    overflow: auto; background-color: rgba(0, 0, 0, 0.6);
    justify-content: center; align-items: flex-start; padding-top: 30px; padding-bottom: 30px;
    scrollbar-width: none; -ms-overflow-style: none;
}
.modal.show { display: flex; animation: fadeIn 0.3s; }
.modal::-webkit-scrollbar { display: none; }
.modal-content {
    background-color: #fff; padding: 1.5rem; border-radius: 12px; width: 90%; max-width: 500px;
    max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid #eee;
}
.modal-title { font-size: 1.2rem; font-weight: 700; color: var(--main-color); }
.close-btn { color: #aaa; font-size: 1.5rem; font-weight: bold; cursor: pointer; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }

/* Required Info Modal (Multi-step) */
#requiredInfoModal, #termsModal, #privacyModal { z-index: 1100 !important; }
.multi-step-modal { max-width: 450px; padding: 2rem; border-radius: 20px; position: relative !important; }
.progress-container { width: 100%; height: 6px; background-color: #f1f3f5; border-radius: 10px; margin-bottom: 2rem; overflow: hidden; margin-top: 30px; }
.progress-bar { height: 100%; width: 33%; background-color: var(--main-color); transition: width 0.3s ease; }
.form-step { display: none; animation: fadeInRight 0.4s ease; }
.form-step.active { display: block; }
.step-title { font-size: 1.6rem; font-weight: 800; color: #333; margin-bottom: 0.5rem; line-height: 1.3; }
.step-desc { font-size: 0.95rem; color: #888; margin-bottom: 2rem; }
.btn-signup-cancel {
    position: absolute; top: 15px; left: 30px; right: auto;
    background-color: #f8f9fa; border: 1px solid #dee2e6; border-radius: 20px;
    padding: 6px 12px; color: #888; font-size: 0.8rem; font-weight: 300; line-height: 1;
    cursor: pointer; z-index: 60; transition: all 0.2s ease; display: flex; align-items: center; gap: 4px;
}
.btn-signup-cancel:hover { background-color: #e9ecef; color: #333; border-color: #ced4da; transform: translateX(-2px); }

/* Luxury Form Styles inside Modal */
.input-group-luxury { margin-bottom: 1.2rem; position: relative; }
.input-group-luxury label { display: block; font-size: 0.85rem; color: var(--main-color); font-weight: 600; margin-bottom: 0.4rem; margin-left: 0.2rem; }
.input-luxury {
    width: 100%; padding: 0.9rem 1rem; border: 1px solid #e0e0e0; background-color: #fdfdfd;
    border-radius: 8px; font-size: 1rem; transition: all 0.3s ease; color: #333;
}
.input-luxury:focus { border-color: var(--main-color); box-shadow: 0 0 0 3px rgba(44, 94, 70, 0.1); background-color: #fff; outline: none; }
.input-luxury::placeholder { color: #aaa; font-size: 0.9rem; }
.btn-row { display: flex; gap: 10px; margin-top: 1.5rem; }
.btn-next, .btn-submit {
    width: 100%; padding: 1rem; background-color: var(--main-color); color: white;
    border: none; border-radius: 12px; font-size: 1.1rem; font-weight: bold; cursor: pointer; margin-top: 1rem;
}
.btn-prev {
    width: 30%; background-color: #f1f3f5; color: #555; border: none; border-radius: 12px;
    font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 1rem;
}

/* Terms Box */
.terms-agreement-box { background-color: #f8f9fa; border: 1px solid #eaeaea; border-radius: 10px; padding: 1.2rem; margin-top: 1.5rem; }
.terms-status-text { font-size: 0.85rem; color: #888; text-align: center; margin-bottom: 1rem; font-weight: 500; }
.terms-status-text.ready { color: var(--main-color); font-weight: bold; }
.terms-actions { display: flex; gap: 10px; margin-bottom: 1rem; }
.btn-term-check {
    flex: 1; padding: 0.9rem; font-size: 0.9rem; border: 1px solid #ddd; background: white;
    border-radius: 12px; color: #666; cursor: pointer; display: flex; align-items: center; justify-content: center;
    gap: 8px; transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1); font-weight: 500; position: relative;
}
.btn-term-check:hover { background-color: #f9f9f9; }
.btn-term-check.checked {
    border-color: var(--main-color); background-color: #e9f5ef; color: var(--main-color);
    font-weight: 700; box-shadow: 0 4px 12px rgba(44, 94, 70, 0.15);
    animation: jellyPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.btn-term-check.checked::before { content: '✔'; display: inline-block; font-size: 1.1em; margin-right: 5px; animation: fadeIn 0.3s ease forwards; }
.terms-content-box {
    background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 1rem;
    max-height: 300px; overflow-y: auto; font-size: 0.9rem; color: #333; line-height: 1.6; white-space: pre-wrap; text-align: left; margin-bottom: 1rem;
}
.accordion-input { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px dashed #e0e0e0; transition: all 0.3s ease; }
.accordion-input label { display: block; font-size: 0.9rem; color: #888; margin-bottom: 0.8rem; font-weight: 500; }
.agreement-check-label {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 1rem; font-weight: 600;
    color: #333; cursor: pointer; padding-top: 0.5rem; border-top: 1px solid #eee;
}
.agreement-check-label input[disabled]+span { color: #aaa; cursor: not-allowed; }
.agreement-check-label input:enabled+span { color: var(--main-color); }

/* Order Review Modal (Specific) */
#orderReviewModal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); justify-content: center !important; align-items: center !important;
    padding: 0 !important; -ms-overflow-style: none; scrollbar-width: none;
}
#orderReviewModal.show { display: flex !important; }
#orderReviewModal .modal-content {
    background-color: #fff; display: flex !important; flex-direction: column !important;
    width: 100% !important; max-width: 420px !important; height: auto !important; max-height: 90vh !important;
    border-radius: 16px !important; box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    padding: 0 !important; overflow: hidden; position: relative !important;
    scrollbar-width: none !important; -ms-overflow-style: none !important; margin: 0 !important;
}
#orderReviewModal .modal-content::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; }
#orderReviewModal .modal-header { flex-shrink: 0; padding: 18px 20px; border-bottom: 1px solid #eee; background: #fff; }
#orderReviewModal .review-container {
    flex: 1 1 auto !important; overflow-y: auto !important; padding: 20px !important; padding-bottom: 30px !important;
    min-height: 150px !important; scrollbar-width: none; -ms-overflow-style: none;
}
#orderReviewModal .review-container::-webkit-scrollbar { display: none; }
#orderReviewModal .modal-footer {
    flex-shrink: 0 !important; padding: 15px 20px 20px 20px; background: white;
    margin-top: 0; border-top: none; display: flex; gap: 10px;
}
#orderReviewModal .modal-footer .btn { flex: 1; margin: 0; }
.order-number-display {
    text-align: center; font-weight: 700; font-size: 1.1rem; color: var(--main-color); padding-bottom: 0.8rem;
    margin: 0 20px 1rem 20px !important; border-bottom: 2px solid #f1f1f1; background-color: #fdfdfd; border-radius: 8px; padding: 1rem;
}
.warning-box {
    flex-shrink: 0 !important; margin: 0 20px !important; border: none; border-top: 1px solid #ffcccc;
    background-color: #fff5f5; padding: 15px 20px; line-height: 1.5; border-radius: 8px !important; transition: all 0.3s ease;
}
.notice-highlight { animation: flashAlert 0.5s ease-in-out 3; }
#cancelDynamicNotice {
    display: inline; background-image: linear-gradient(120deg, rgba(255, 230, 0, 0.4) 0%, rgba(255, 230, 0, 0.4) 100%);
    background-repeat: no-repeat; background-size: 0% 100%; background-position: 0 88%; padding-bottom: 2px; line-height: 1.6;
}
.notice-highlight #cancelDynamicNotice { animation: drawHighlighter 6.0s cubic-bezier(0.25, 1, 0.5, 1) forwards; animation-delay: 2.8s; }

/* Review Items List inside Modal */
#reviewItemsList { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 0; overflow: hidden; }
.review-items-box { font-size: 0.9rem; background: #f9f9f9; padding: 0.8rem; border-radius: 6px; margin-top: 0.8rem; border: 1px solid #eee; }
.review-row {
    display: flex; justify-content: space-between; align-items: center; padding: 7px 10px;
    border-bottom: 1px dashed #e0e0e0;
    background: linear-gradient(to bottom, var(--main-color), var(--main-color)) left center / 2.5px 75% no-repeat;
}
.review-row:last-child { border-bottom: none; }
.review-row.is-option { background: #fafafa; padding-left: 25px; font-size: 0.9em; }
.review-row.is-option .review-col-name { color: #666; }
.review-col-name { flex: 1; display: flex; align-items: flex-start; padding-right: 10px; font-size: 0.95rem; color: #333; line-height: 1.3; }
.review-opt-mark { color: #ccc; margin-right: 5px; }
.review-col-qty { width: 60px; display: flex; justify-content: center; align-items: center; }
.review-qty-btn {
    background-color: #f1f3f5; color: #495057; border: 1px solid #dee2e6; padding: 4px 10px;
    border-radius: 20px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.review-qty-btn:hover { background-color: #e9ecef; color: #212529; }
.review-qty-input {
    width: 50px; padding: 4px; text-align: center; border: 2px solid var(--main-color);
    border-radius: 6px; font-weight: bold; color: var(--main-color); outline: none; font-size: 0.9rem; animation: fadeIn 0.2s ease-out;
}
.review-col-price { width: 80px; text-align: right; font-weight: 700; color: #333; font-size: 0.95rem; display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.review-total-text { text-align: right; font-weight: bold; margin-top: 0.5rem; color: var(--main-color); font-size: 1.1rem; }

/* Review Options & Inputs */
.review-section { margin-bottom: 2.0rem; }
.review-section h4 { font-size: 1rem; color: var(--main-color); margin-bottom: 0.5rem; border-bottom: none; padding-bottom: 0.3rem; }
.order-type-buttons { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.type-btn {
    flex: 1; padding: 0.8rem; border: 1px solid var(--light-gray); border-radius: 8px; background: white;
    font-weight: 600; color: #555; cursor: pointer; transition: all 0.2s;
}
.type-btn.active { border-color: var(--main-color); background: #e9f5ef; color: var(--main-color); }
.delivery-summary { border: 1px solid #17a2b8; background: #eef9fa; padding: 0.8rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; color: #333; line-height: 1.6; }
.datetime-group { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; width: 100%; }
.datetime-group input[type="date"], .datetime-group input[type="time"] { padding: 0.5rem; border: 1px solid var(--light-gray); border-radius: 4px; font-size: 0.9rem; flex: 1; }
.now-btn { padding: 0.5rem 0.6rem; background: var(--accent-color); color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 0.8rem; white-space: nowrap; }
.checkbox-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }
.checkbox-item { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; font-size: 0.9rem; }
.search-group { display: flex; gap: 8px; }
.btn-luxury-outline {
    padding: 0 1.2rem; border: 1px solid var(--main-color); background: white; color: var(--main-color);
    font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-luxury-outline:hover { background-color: #f0f5f3; }
.info-summary-box {
    background-color: #e3f2fd; border: 1px solid #90caf9; padding: 1rem; border-radius: 8px;
    font-size: 0.9rem; color: #333; line-height: 1.6; margin-bottom: 0.5rem; animation: fadeIn 0.3s;
}
.info-summary-title { font-weight: bold; color: #1565c0; margin-bottom: 0.4rem; border-bottom: 1px dashed #90caf9; padding-bottom: 0.2rem; display: block; }
.info-summary-item { display: flex; margin-bottom: 0.2rem; }
.info-summary-label { width: 70px; color: #666; font-weight: 500; }
.info-summary-value { flex: 1; font-weight: 600; }
.reservation-notice-box {
    margin-top: 15px; padding: 16px; background-color: #fdfbf7; border: 1px solid #e8dfc4;
    border-left: 5px solid #d4af37; border-radius: 8px; display: flex; gap: 12px; align-items: flex-start;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03); animation: fadeIn 0.4s ease-out;
}
.notice-icon { font-size: 1.6rem; line-height: 1; margin-top: 2px; }
.notice-content { flex: 1; }
.notice-title { font-size: 0.95rem; font-weight: 800; color: #5d4037; margin: 0 0 6px 0; }
.notice-desc { font-size: 0.85rem; color: #666; line-height: 1.5; margin: 0; word-break: keep-all; }
.notice-desc strong { color: #d35400; font-weight: 700; }
.notice-desc .highlight { background: linear-gradient(to top, #ffe082 40%, transparent 40%); font-weight: 700; color: #333; }

/* Success Modal Specifics */
#orderSuccessModal .modal-content { max-height: none !important; overflow-y: visible !important; scrollbar-width: none; -ms-overflow-style: none; }
#orderSuccessModal .modal-content::-webkit-scrollbar { display: none; }
#orderSuccessModal .review-items-box { max-height: none !important; overflow: visible !important; }

/* Letter Modal (Long Term) */
.letter-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 12000;
    display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s;
}
.letter-modal.show { opacity: 1; visibility: visible; }
.letter-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(44, 62, 80, 0.6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.letter-card {
    position: relative; width: 90%; max-width: 400px; background-color: #fffbf0;
    background-image: linear-gradient(to bottom, #fffbf0 0%, #fff 100%);
    border-radius: 16px; padding: 2.5rem 2rem 2rem 2rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center; transform: translateY(30px) scale(0.95); transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #eaddcf;
}
.letter-modal.show .letter-card { transform: translateY(0) scale(1); }
.letter-decoration-top {
    position: absolute; top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, #d4af37, #f1c40f, #d4af37); border-radius: 16px 16px 0 0;
}
.letter-icon-wrapper { margin-bottom: 1.5rem; }
.letter-icon {
    font-size: 3.5rem; display: inline-block; animation: letterFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}
.letter-title {
    font-family: 'Noto Sans KR', sans-serif; font-size: 1.4rem; color: #5d4037;
    margin-bottom: 1.5rem; font-weight: 700; letter-spacing: -0.5px;
}
.letter-body p { font-size: 0.95rem; color: #555; line-height: 1.7; margin-bottom: 1rem; word-break: keep-all; }
.highlight-paragraph {
    background: rgba(212, 175, 55, 0.1); padding: 1rem; border-radius: 8px;
    border-left: 3px solid #d4af37; color: #333;
}
.highlight-paragraph strong { color: #d35400; }
.letter-tip-box {
    margin-top: 1.5rem; background-color: #f1f8e9; border-radius: 12px; padding: 1rem;
    display: flex; gap: 10px; text-align: left; font-size: 0.85rem; border: 1px dashed #a5d6a7;
}
.tip-icon { font-size: 1.2rem; }
.tip-content { color: #2e7d32; line-height: 1.5; }
.letter-footer { margin-top: 2rem; }
.btn-letter-confirm {
    background: #5d4037; color: #fff; border: none; padding: 0.9rem 2rem; border-radius: 50px;
    font-size: 1rem; font-weight: 600; cursor: pointer; box-shadow: 0 4px 15px rgba(93, 64, 55, 0.3);
    transition: all 0.2s; width: 100%;
}
.btn-letter-confirm:hover { background: #4e342e; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(93, 64, 55, 0.4); }

/* [수정] 로그인 및 내 정보 수정 모달용 기본 입력창 스타일 복구 */
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--light-gray); /* 두께 2px 유지 */
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #fff; /* 배경색 명시 */
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--main-color);
}

/* 프로필 모달 내 주소 검색 버튼 옆 인풋 간격 */
.form-group input[readonly] {
    background-color: #f8f9fa;
    cursor: default;
}
/* 내 정보 수정 모달: 입력 항목 간격 조절 */
#profileForm .form-group {
    margin-bottom: 1.8rem; /* 기본값은 약 1.2rem 입니다. 1.5 ~ 2.0 정도로 늘려보세요 */
}

/* 토글 스위치 스타일 */
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #FAE100; /* 카카오 옐로우 */
}

input:checked + .slider:before {
  transform: translateX(14px);
}

/* =========================================
   9. Admin & System
   ========================================= */
body.editing-mode .container { position: relative; }
body.editing-mode::after {
    content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6); z-index: 90; pointer-events: none;
}
body.editing-mode .menu-item-card {
    z-index: 91; cursor: pointer; transition: transform 0.2s; box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}
body.editing-mode .menu-item-card:active { transform: scale(0.95); }
body.editing-mode .menu-item-card.will-be-sold-out { background-color: #333; color: #ccc; border: 2px solid #c0392b; }
body.editing-mode .menu-item-card.sold-out {
    pointer-events: auto !important; cursor: pointer; opacity: 0.8; border: 2px solid #c0392b; transform: scale(0.95);
}
body.editing-mode .menu-item-card.sold-out:hover { border-color: #27ae60; box-shadow: 0 0 10px rgba(39, 174, 96, 0.3); }

.admin-btn {
    background-color: #2c3e50; color: #f1c40f; border: 1px solid #f1c40f; padding: 0.3rem 0.6rem;
    border-radius: 20px; font-size: 0.8rem; font-weight: bold; cursor: pointer;
    margin-right: 0.5rem; transition: all 0.2s; animation: pulseBorder 2s infinite;
}
.admin-floating-bar {
    position: fixed; bottom: 0; left: 0; right: 0; background: #2c3e50; padding: 1rem;
    z-index: 2000; display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); animation: slideUp 0.3s ease-out;
}
.admin-msg { color: white; font-weight: bold; font-size: 0.95rem; }
.admin-actions { display: flex; gap: 10px; }

.holiday-item {
    display: flex; justify-content: space-between; align-items: center; background: white;
    padding: 0.6rem; margin-bottom: 0.5rem; border: 1px solid #eee; border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.holiday-info { font-size: 0.85rem; color: #444; line-height: 1.4; }
.btn-del-holiday {
    background: #ff6b6b; color: white; border: none; padding: 0.3rem 0.6rem;
    border-radius: 4px; font-size: 0.8rem; cursor: pointer;
}

/* System Notifications */
.top-system-noti {
    position: fixed; top: -100px; left: 0; width: 100%; background-color: rgba(44, 62, 80, 0.95);
    color: white; padding: 1rem; text-align: center; z-index: 10000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; justify-content: center; align-items: center; gap: 10px; font-weight: 500; font-size: 0.95rem;
}
.top-system-noti.show { top: 0; }
.top-system-noti.alert { border-bottom: 3px solid #e74c3c; }
.top-system-noti.info { border-bottom: 3px solid #2ecc71; }
.toast-notification {
    position: fixed; bottom: 10%; left: 50%; transform: translateX(-50%); background-color: rgba(0, 0, 0, 0.8);
    color: white; padding: 0.8rem 1.2rem; border-radius: 25px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2000; opacity: 0; transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none; font-size: 0.9rem; text-align: center; white-space: nowrap;
}
.toast-notification.show { opacity: 1; transform: translate(-50%, -10px); }

/* Buttons */
.btn { padding: 0.8rem 1.2rem; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-primary { background-color: var(--main-color); color: var(--white-color); }
.btn-primary:hover { background-color: #1e3f30; }
.btn-secondary { background-color: #6c757d; color: white; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.85rem; border-radius: 4px; margin-left: 2px; }
.btn-full-width { width: 100%; margin-top: 0.8rem; padding: 0.8rem; }
.btn-cancel-order {
    background-color: #fff; border: 1px solid #dc3545; color: #dc3545; padding: 4px 8px;
    border-radius: 4px; font-size: 0.75rem; cursor: pointer; margin-top: 5px; transition: all 0.2s;
}
.btn-cancel-order:hover { background-color: #dc3545; color: white; }

/* Data Table (History) */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th, .data-table td { padding: 0.8rem; text-align: left; border-bottom: 1px solid var(--light-gray); }
.data-table thead th { background-color: #f8f9fa; font-weight: 600; color: var(--text-color); }
.data-table .amount { text-align: right; font-weight: 600; color: var(--main-color); }
.empty-state { text-align: center; padding: 2rem; color: #868e96; }
.order-history-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.order-history-table thead th { background-color: #2c5e46; color: white; padding: 12px 10px; font-weight: 600; font-size: 0.9rem; border: none; }
.order-history-table tbody tr { border-bottom: 1px solid #f0f0f0; transition: background 0.2s; }
.order-history-table tbody tr:hover { background-color: #f8f9fa; }
.order-menu-cell { cursor: pointer; transition: all 0.2s; padding: 4px; border-radius: 6px; }
.order-menu-cell:hover { background-color: #e9f5ef; transform: translateX(2px); }
.status-badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; background: #e9ecef; color: #495057; }
.status-badge.success { background: #d4edda; color: #155724; }
.status-badge.cancelled { background: #f8d7da; color: #721c24; }
.status-badge.completed { background: #cfe2ff; color: #084298; }
.status-badge.cooking { background: #fff3cd; color: #856404; }
.btn-cancel-mini {
    display: inline-block; margin-top: 6px; padding: 3px 8px; background: #fff;
    border: 1px solid #dc3545; color: #dc3545; border-radius: 4px; font-size: 0.7rem; cursor: pointer; transition: all 0.2s;
}
.btn-cancel-mini:hover { background: #dc3545; color: white; }


/* WPAY 고급 시뮬레이션 스타일 */
.wpay-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 99999; justify-content: center; align-items: flex-end; /* 모바일은 아래에서 올라오게 */
}
.wpay-card-body {
    background: #fff; width: 100%; max-width: 420px; border-radius: 20px 20px 0 0;
    overflow: hidden; box-shadow: 0 -5px 25px rgba(0,0,0,0.2); animation: slideUp 0.3s ease-out;
    display: flex; flex-direction: column; max-height: 90vh;
}
@media (min-width: 480px) {
    .wpay-modal-overlay { align-items: center; }
    .wpay-card-body { border-radius: 16px; }
}

.wpay-header {
    background: #d91111; padding: 15px 20px; color: white; display: flex; justify-content: space-between; align-items: center;
}
.wpay-logo { font-weight: 800; font-size: 1.2rem; font-style: italic; }
.wpay-close-btn { color: white; font-size: 1.5rem; background: none; border: none; cursor: pointer; }

.wpay-step { padding: 25px 20px; flex: 1; overflow-y: auto; }
.wpay-title { font-size: 1.2rem; margin-bottom: 5px; color: #333; }
.wpay-desc { font-size: 0.9rem; color: #888; margin-bottom: 20px; }

.wpay-input-group { margin-bottom: 20px; }
.wpay-input-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #555; margin-bottom: 8px; }
.wpay-input-group input {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; outline: none; transition: 0.2s;
}
.wpay-input-group input:focus { border-color: #d91111; }

.card-num-inputs { display: flex; gap: 8px; }
.card-num-inputs input { text-align: center; padding: 10px 0; }
.wpay-row { display: flex; gap: 15px; }

.wpay-btn-primary {
    width: 100%; padding: 16px; background: #d91111; color: white; border: none; border-radius: 12px;
    font-size: 1.1rem; font-weight: bold; cursor: pointer; margin-top: 10px;
}

/* 비밀번호 화면 스타일 */
.registered-card-icon { font-size: 3rem; margin-bottom: 10px; }
.wpay-price-text { font-size: 1.8rem; color: #d91111; font-weight: 800; margin: 5px 0 20px 0; }
.pwd-dots-wrapper { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; }
.pwd-dot { width: 14px; height: 14px; border-radius: 50%; background: #eee; transition: 0.2s; }
.pwd-dot.filled { background: #333; transform: scale(1.2); }

.wpay-keypad { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: #eee; margin: 0 -20px -25px -20px; }
.wpay-keypad button {
    background: white; border: none; padding: 20px; font-size: 1.5rem; font-weight: 500; cursor: pointer;
}
.wpay-keypad button:active { background: #f5f5f5; }
.wpay-keypad .key-empty { background: #f9f9f9; pointer-events: none; }

/* 로딩 스피너 */
.wpay-spinner {
    width: 50px; height: 50px; border: 5px solid #f3f3f3; border-top: 5px solid #d91111; border-radius: 50%;
    animation: spin 1s linear infinite; margin: 0 auto;
}

/* --- WPAY 카드 리스트 스타일 --- */
.wpay-card-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; max-height: 300px; overflow-y: auto; }
.wpay-card-item {
    display: flex; align-items: center; padding: 15px; border: 1px solid #eee; border-radius: 12px;
    cursor: pointer; transition: all 0.2s; position: relative;
}
.wpay-card-item:hover { background-color: #f9f9f9; border-color: #d91111; }
.wpay-card-icon {
    width: 40px; height: 26px; border-radius: 4px; background: #333; margin-right: 15px;
    background: linear-gradient(45deg, #333, #555);
}
.wpay-card-info { flex: 1; }
.wpay-card-alias { font-weight: bold; font-size: 0.95rem; color: #333; display: block; }
.wpay-card-number { font-size: 0.8rem; color: #888; }
.wpay-card-del-btn {
    padding: 5px 10px; font-size: 0.8rem; color: #e74c3c; background: #fff5f5; border-radius: 4px;
}

.wpay-add-btn {
    width: 100%; padding: 15px; border: 1px dashed #ccc; background: white; color: #666;
    border-radius: 12px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.wpay-add-btn:hover { border-color: #d91111; color: #d91111; background: #fff0f0; }

/* --- 미니 카드 프리뷰 (비밀번호 입력창용) --- */
.mini-card-preview {
    width: 160px; height: 100px; border-radius: 10px; margin: 0 auto 15px auto;
    position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 10px;
    color: white; text-align: left;
}
.mini-card-chip { width: 25px; height: 18px; background: #d4af37; border-radius: 3px; position: absolute; top: 15px; left: 15px; }
.mini-card-num { font-family: monospace; font-size: 1rem; letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }

/* --- [핵심] 리얼 결제 애니메이션 --- */
.pay-animation-container {
    position: absolute; top: 50px; left: 50%; transform: translateX(-50%);
    width: 200px; height: 200px;
}

/* 단말기 */
.pay-terminal {
    width: 140px; height: 50px; background: #2c3e50; position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    border-radius: 10px 10px 40px 40px; box-shadow: 0 10px 20px rgba(0,0,0,0.2); z-index: 10;
}
.terminal-slot {
    width: 100px; height: 6px; background: #000; margin: 0 auto; border-radius: 3px; margin-top: 10px;
}
.terminal-light {
    width: 8px; height: 8px; background: #555; border-radius: 50%; position: absolute; top: 10px; right: 15px;
    transition: 0.3s;
}
.pay-terminal.active .terminal-light { background: #2ecc71; box-shadow: 0 0 10px #2ecc71; }

/* 움직이는 카드 */
.pay-card-visual {
    width: 100px; height: 150px; background: linear-gradient(135deg, #d91111 0%, #ff5e5e 100%);
    border-radius: 8px; position: absolute; top: -120px; left: 50%; margin-left: -50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 5;
    animation: insertCard 2.5s ease-in-out forwards;
}
.pay-card-chip {
    width: 25px; height: 20px; background: #f1c40f; border-radius: 3px;
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
}
.pay-card-text {
    position: absolute; top: 15px; width: 100%; text-align: center; color: rgba(255,255,255,0.8);
    font-size: 0.7rem; font-weight: bold; letter-spacing: 1px; transform: rotate(180deg); /* 꽂힐 때 위가 아래로 가니까 */
}

@keyframes insertCard {
    0% { top: -120px; transform: scale(1); }
    20% { top: -40px; transform: scale(1); } /* 단말기 입구 도착 */
    40% { top: 10px; transform: scale(0.95); } /* 꽂힘 */
    70% { top: 10px; transform: scale(0.95); } /* 대기 (처리중) */
    100% { top: -200px; opacity: 0; } /* 결제 완료 후 슝 사라짐 */
}
/* =========================================
   10. Mobile Responsive Overrides
   ========================================= */

@media (max-width: 768px) {
    html { font-size: 14px; }
    .container { padding: 0px; padding-bottom: 0px; }
    .login-card { padding: 1.5rem 1rem; }
    
    header, .order-section { border-radius: 0; box-shadow: none; border-bottom: 1px solid #eee; margin-bottom: 0.8rem; }
    header { padding: 1rem; position: sticky; top: 0; z-index: 80; background: white; }
    
    .info-summary-label { width: 60px; }
    
    /* Menu Categories Scroll */
    .menu-categories { display: flex; flex-wrap: nowrap; overflow-x: visible; gap: 2px; justify-content: space-between; padding-bottom: 0; }
    .category-btn { flex: 1; font-size: 0.95rem; padding: 0.5rem 0; border-radius: 8px; min-width: 0; }
    
    /* Menu Items Grid */
    .menu-items { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 0.4rem; }
    .menu-item-card { padding: 0.5rem 0.2rem; }
    #beverageItems, #addonItems { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
    
    .toast-notification.loading-toast { background-color: rgba(44, 94, 70, 0.95); font-weight: bold; }
    
    .selected-item { flex-wrap: wrap; gap: 0.5rem; }
    .selected-item span:last-child { margin-left: auto; }
    
    .order-floating-bar { bottom: 1rem; margin: 0 0.5rem; }
    
    /* DateTime & Top Bar */
    .datetime-group { display: flex; gap: 5px; flex-wrap: nowrap; width: 100%; }
    .datetime-group input { flex: 1; min-width: 0; font-size: 0.85rem; padding: 0.5rem 0.2rem; }
    .now-btn { padding: 0.5rem 0.4rem; font-size: 0.75rem; white-space: nowrap; }
    
    .status-top-bar { white-space: nowrap; padding: 0.5rem 0.9rem; padding-left: 0.7rem; }
    .store-status-text { font-size: 0.85rem; letter-spacing: -0.5px; }
    #clockDate { display: none; }
    .weather-location { margin-right: 1px; font-weight: 200; }
    .weather-widget { margin-right: 5px; font-size: 0.8rem; }
    .weather-icon { font-size: 0.9rem; }
    #clockTime { font-size: 0.85rem; font-weight: 600; }
    
    /* Tables */
    .data-table { font-size: 0.85rem; }
    .data-table th, .data-table td { padding: 6px 4px; font-size: 0.8rem; }
    .data-table .amount { font-size: 0.85rem; }
    .btn-cancel-order { padding: 3px 6px; font-size: 0.7rem; }
    
    .order-history-table thead th { font-size: 0.8rem; padding: 10px 6px; }
    .order-history-table tbody td { padding: 10px 6px !important; font-size: 0.85rem; }
    .status-badge { font-size: 0.7rem; padding: 3px 8px; }
    .btn-cancel-mini { font-size: 0.65rem; padding: 2px 6px; }
    #orderHistoryModal .modal-content { padding: 10px; }
    
    /* Order Review Modal - Full Screen override */
    #orderReviewModal.modal {
        background-color: transparent !important; padding: 0 !important; align-items: flex-start;
        transition: background-color 0.3s; scrollbar-width: none !important; -ms-overflow-style: none !important;
    }
    #orderReviewModal.modal::-webkit-scrollbar { display: none !important; }
    #orderReviewModal .modal-content {
        background-color: #fff; width: 100% !important; min-height: 100vh; height: auto !important; max-width: none !important;
        max-height: none !important; border-radius: 0 !important; margin: 0; padding: 1rem;
        transform: translateX(100%); opacity: 1; scrollbar-width: none !important; -ms-overflow-style: none !important; overflow-y: scroll !important;
    }
    #orderReviewModal .modal-content::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; }
    #orderReviewModal .review-items-box { scrollbar-width: none !important; -ms-overflow-style: none !important; }
    #orderReviewModal .review-items-box::-webkit-scrollbar { display: none !important; }
    #orderReviewModal .review-container { flex: 1; overflow-y: auto; padding: 20px; padding-bottom: 30px; scrollbar-width: none; -ms-overflow-style: none; }
    #orderReviewModal .review-container::-webkit-scrollbar { display: none; }
    #orderReviewModal .close-btn { padding: 0.5rem; font-size: 2rem; }
    
    #orderReviewModal.show .modal-content { animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
    #orderReviewModal.closing .modal-content { animation: slideOutRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
    
    /* Wide View (Sets) Override */
    .menu-items.wide-view .menu-item-card { padding: 1rem; }
    .menu-items.wide-view .menu-item-name { font-size: 1rem; }
    .menu-items.wide-view .menu-item-price { font-size: 1rem; }
}

@media (max-width: 480px) {
    .selected-item { padding: 0.5rem 0.8rem; }
    .item-price-text { font-size: 0.9rem; min-width: auto; }
    .main-text { font-size: 0.9rem; }
    .sub-text { font-size: 0.75rem; }
    .btn-signup-cancel { top: 12px; left: 12px; font-size: 0.75rem; padding: 5px 10px; }
    .multi-step-modal .progress-container { margin-top: 35px; }
    .letter-card { padding: 2rem 1.5rem; width: 85%; }
    .letter-title { font-size: 1.25rem; }
    .letter-body p { font-size: 0.9rem; }
    .letter-tip-box { font-size: 0.8rem; }
    
    /* Order Review Modal extra overrides for small screens */
    #orderReviewModal { align-items: flex-start !important; }
    #orderReviewModal .modal-content {
        width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important; border-radius: 0 !important;
    }
    #orderReviewModal.show .modal-content { animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
}

@media (max-width: 360px) {
    #clockDate { display: none; }
    .store-status-text { display: none; }
    .item-info-right { min-width: auto; gap: 6px; }
    .item-price-text { width: auto; font-size: 0.9rem; }
    .review-qty-btn { padding: 3px 8px; font-size: 0.75rem; }
    .review-col-price { width: auto; font-size: 0.9rem; }
}

