* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background: #f5f5f5;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

button {
    font: inherit;
}

img {
    max-width: 100%;
}

.header {
    padding: 14px 16px;
    background: #fff8ed;
}

.header h1 {
    margin: 0;
    color: #ff6b00;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.banner-carousel {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}

.banner-carousel::-webkit-scrollbar {
    display: none;
}

.banner-track {
    display: flex;
    width: 100%;
}

.banner-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.banner-slide img {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
}

.banner-img[src$="image-placeholder.svg"] {
    height: 180px;
    background: #f3f5f4;
    object-fit: contain;
}

.container {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.sidebar {
    position: sticky;
    top: 0;
    flex: 0 0 80px;
    width: 80px;
    height: 100vh;
    overflow-y: auto;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-item {
    display: block;
    width: 100%;
    padding: 15px 4px;
    border: 0;
    border-left: 3px solid transparent;
    background: transparent;
    color: #666666;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    touch-action: manipulation;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-item.active {
    border-left-color: #ff6700;
    background: #f8f8f8;
    color: #111111;
    font-weight: 700;
}

@media (hover: hover) {
    .sidebar-item:hover:not(.active) {
        background: #f8f8f8;
    }
}

.content {
    flex: 1;
    min-width: 0;
    padding: 15px;
}

.section-title {
    position: relative;
    margin-bottom: 15px;
    padding-left: 15px;
    color: #333333;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.section-title::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 5px;
    height: 20px;
    border-radius: 3px;
    background: #ff6733;
    content: "";
    transform: translateY(-50%);
}

.coupon-list {
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
}

.coupon-group-list {
    display: none;
    width: 100%;
}

.coupon-group-list.active {
    display: block;
}

.coupon-card {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
    transition: background-color 0.15s ease;
}

.coupon-card:last-child {
    border-bottom: 0;
}

@media (hover: hover) {
    .coupon-card:hover {
        background: #fffbf7;
    }
}

.coupon-content {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
}

.coupon-icon {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin-right: 15px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #fafafa;
}

.coupon-icon img {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    object-fit: cover;
}

.coupon-info {
    flex: 1;
    min-width: 0;
}

.coupon-title {
    margin-bottom: 5px;
    overflow: hidden;
    color: #333333;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coupon-desc {
    overflow: hidden;
    color: #ff6700;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coupon-button {
    flex-shrink: 0;
    height: 28px;
    margin-left: 8px;
    padding: 0 12px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff6700, #ff8c42);
    box-shadow: 0 1px 3px rgba(255, 103, 0, 0.2);
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    line-height: 28px;
    touch-action: manipulation;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.coupon-button:active {
    opacity: 0.88;
    transform: scale(0.96);
}

.contact-fab {
    position: fixed;
    left: 16px;
    bottom: max(30px, env(safe-area-inset-bottom));
    z-index: 1000;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ff6b00;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 56px;
    touch-action: manipulation;
}

.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
}

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

.qr-content {
    position: relative;
    width: 100%;
    max-width: 280px;
    padding: 20px;
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
}

.qr-content h3 {
    margin: 0;
    color: #222222;
    font-size: 17px;
    line-height: 1.4;
}

.qr-code {
    display: block;
    width: 180px;
    height: 180px;
    margin: 10px auto;
    border: 1px solid #eeeeee;
    object-fit: contain;
}

.qr-content p {
    margin: 8px 0 0;
    color: #777777;
    font-size: 13px;
    line-height: 1.5;
}

.close-btn {
    position: absolute;
    top: 4px;
    right: 8px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #999999;
    cursor: pointer;
    font-size: 24px;
    line-height: 32px;
}

.site-footer {
    margin-top: auto;
    padding: 26px 16px calc(22px + env(safe-area-inset-bottom));
    color: #8a9693;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    color: #ff6b00;
}

@media (max-width: 360px) {
    .sidebar {
        flex-basis: 72px;
        width: 72px;
    }

    .content {
        padding: 12px 10px;
    }

    .coupon-button {
        padding: 0 10px;
    }
}
