@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --brand: #ff5a2c;
    --brand-soft: #ff8a3d;
    --bg: #fff4e8;
    --surface: #ffffff;
    --surface-soft: #fffaf4;
    --line: #f2d8c4;
    --text: #2e2621;
    --muted: #8a7464;
    --success: #1fa37a;
    --warn: #f7a835;
    --danger: #e85e54;
    --shadow: 0 22px 45px rgba(255, 90, 44, 0.2);
    --radius-xl: 30px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', 'Manrope', sans-serif;
    color: var(--text);
    background:
        radial-gradient(70rem 30rem at -8% -15%, rgba(255, 146, 89, 0.4), transparent 55%),
        radial-gradient(70rem 35rem at 110% -12%, rgba(255, 90, 44, 0.26), transparent 52%),
        var(--bg);
    overflow-x: hidden;
}

a {
    color: #d34b25;
    text-decoration: none;
}

.fx-orb {
    position: fixed;
    width: 38vw;
    aspect-ratio: 1;
    border-radius: 999px;
    filter: blur(55px);
    opacity: 0.45;
    pointer-events: none;
    z-index: -2;
}

.fx-orb-orange {
    top: -9vh;
    left: -8vw;
    background: rgba(255, 90, 44, 0.65);
}

.fx-orb-peach {
    top: 20vh;
    right: -15vw;
    background: rgba(255, 161, 102, 0.62);
}

.fx-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 90, 44, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 90, 44, 0.03) 1px, transparent 1px);
    background-size: 22px 22px;
    z-index: -1;
}

.app-shell,
.guest-shell {
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 12px 10px 20px;
}

.glass-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.phone-shell {
    background: var(--surface);
    border: 1px solid rgba(255, 90, 44, 0.18);
    border-radius: 34px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.top-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 2px;
    font-size: 0.72rem;
    color: #ffe9dc;
    letter-spacing: 0.04em;
    background: linear-gradient(120deg, var(--brand), var(--brand-soft));
}

.top-bar {
    background: linear-gradient(120deg, var(--brand), var(--brand-soft));
    color: #fff;
    padding: 14px 14px 18px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    position: relative;
}

.top-bar::after {
    content: '';
    position: absolute;
    left: -8%;
    right: -8%;
    bottom: -32px;
    height: 50px;
    background: var(--surface);
    border-radius: 50%;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.88);
}

.top-bar h1 {
    margin: 0;
    font-size: 1.23rem;
    font-weight: 800;
}

.hero-muted {
    margin: 5px 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.muted {
    color: var(--muted);
    font-size: 0.82rem;
}

.top-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    z-index: 1;
}

.icon-btn,
.profile-bubble {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.36);
    position: relative;
    color: #fff;
    font-weight: 700;
}

.profile-bubble {
    background: rgba(255, 255, 255, 0.3);
}

.icon-mark {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
}

.badge {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #2d1b11;
    color: #fff;
    font-size: 0.66rem;
}

.page-stage {
    padding: 18px 12px 84px;
    background: var(--surface);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.section-head h2 {
    margin: 0;
    font-size: 1.03rem;
}

.section-head small {
    font-size: 0.72rem;
    color: #b49074;
    letter-spacing: 0.05em;
}

.alert {
    border-radius: 14px;
    padding: 10px 12px;
    margin: 10px 0;
    border: 1px solid transparent;
    font-size: 0.83rem;
    font-weight: 600;
}

.alert-error {
    background: #ffefed;
    border-color: #f9c4be;
    color: #9f3328;
}

.alert-success {
    background: #ebfff7;
    border-color: #bcead8;
    color: #1a6f50;
}

.wallet-hero {
    border-radius: 20px;
    padding: 16px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.26), transparent 36%),
        linear-gradient(135deg, #8d1f0b, #ca3f14 56%, #ff7e2f);
    box-shadow: 0 16px 28px rgba(157, 61, 24, 0.36);
}

.wallet-hero .label {
    margin: 0;
    font-size: 0.73rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.84);
}

.wallet-hero h3 {
    margin: 8px 0;
    font-size: 2rem;
    line-height: 1.08;
}

.wallet-hero .wallet-action {
    margin-top: 10px;
}

.wallet-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.18);
}

.metric-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.metric-card,
.card {
    border-radius: 14px;
    padding: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    box-shadow: 0 5px 12px rgba(255, 90, 44, 0.08);
}

.metric-card p,
.card p {
    margin: 0;
    font-size: 0.76rem;
    color: #9a7f6a;
}

.metric-card strong,
.card h3 {
    display: block;
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 800;
}

.quick-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.quick-grid a {
    min-height: 88px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    color: #48362b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 8px 20px rgba(255, 90, 44, 0.1);
    transition: transform 0.2s ease;
}

.quick-grid a::before {
    content: attr(data-icon);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-soft));
    box-shadow: 0 8px 15px rgba(255, 90, 44, 0.34);
}

.quick-grid a:hover {
    transform: translateY(-2px);
}

.section-card,
.list-card {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(255, 90, 44, 0.08);
}

.section-card h3,
.list-card h3 {
    margin: 0 0 10px;
    font-size: 0.98rem;
}

.pack-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 2px;
}

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

.pack-tile {
    min-width: 220px;
    border-radius: 16px;
    padding: 12px;
    scroll-snap-align: start;
    color: #fff;
    background: linear-gradient(145deg, #9a2f12, #dc4a19 60%, #ff8840);
    box-shadow: 0 12px 22px rgba(208, 78, 29, 0.3);
}

.pack-tile p,
.pack-tile small {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.74rem;
}

.pack-tile strong {
    display: block;
    margin: 6px 0;
}

.progress-wrap {
    margin-top: 8px;
}

.progress-bar {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.3);
}

.progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(120deg, #ffe4aa, #ffd17f);
}

.notice-list,
.coupon-grid,
.task-cards,
.timeline-list,
.profile-list,
.setting-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notice-item,
.coupon-card,
.task-card,
.timeline-card,
.profile-card,
.setting-row {
    border-radius: 14px;
    padding: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.notice-item h4,
.task-card h4,
.coupon-card h4,
.timeline-card h4,
.profile-card h4 {
    margin: 0 0 4px;
}

.notice-item p,
.task-card p,
.coupon-card p,
.timeline-card p,
.profile-card p,
.setting-row p {
    margin: 4px 0;
    color: #7d6859;
    font-size: 0.8rem;
}

.notice-item time {
    display: block;
    margin-top: 6px;
    color: #a08878;
    font-size: 0.7rem;
}

.coupon-card {
    background: linear-gradient(145deg, #fff8f2, #fff2e6);
}

.coupon-card.silver {
    background: linear-gradient(145deg, #fff6ef, #fff9f4);
}

.coupon-card.is-revealing {
    animation: couponReveal 0.55s ease;
}

@keyframes couponReveal {
    0% { transform: scale(1); }
    50% { transform: scale(1.02) rotate(0.4deg); }
    100% { transform: scale(1); }
}

.spin-stage {
    margin-top: 14px;
    border-radius: 18px;
    padding: 14px;
    text-align: center;
    border: 1px solid #f1c8ab;
    background: linear-gradient(180deg, #fff8f2, #fff2e6);
}

.wheel-wrap {
    width: min(320px, 100%);
    margin: 8px auto 4px;
    position: relative;
}

#wheelCanvas {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    border-radius: 999px;
    background: radial-gradient(circle at center, #fff7eb 10%, #ffe6d1 100%);
    border: 7px solid #f3b17d;
    box-shadow: 0 16px 30px rgba(209, 113, 52, 0.25);
}

.wheel-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 24px solid #2f2a25;
}

.neon-btn,
button,
.btn {
    border: none;
    border-radius: 12px;
    padding: 11px 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(130deg, var(--brand), var(--brand-soft));
    box-shadow: 0 10px 18px rgba(255, 90, 44, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary {
    background: #ffeadd;
    color: #a44a2e;
    box-shadow: none;
    border: 1px solid #f8c6a8;
}

.btn-danger {
    background: linear-gradient(130deg, #e75b56, #ff8865);
}

.spin-form {
    margin-top: 10px;
}

.spin-fixed {
    position: sticky;
    bottom: 74px;
    margin-top: 10px;
    z-index: 5;
}

.metric-pill {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border: 1px solid #efceb4;
    border-radius: 999px;
    background: #fff7ef;
    padding: 9px;
    text-align: center;
}

.metric-pill strong {
    display: block;
    margin-top: 2px;
    font-size: 0.9rem;
    color: #5b3f2f;
}

.metric-pill span {
    font-size: 0.68rem;
    color: #9b7f6a;
}

.ticker {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid #f4cfb4;
    background: #fff7ee;
    overflow: hidden;
    white-space: nowrap;
}

.ticker p {
    margin: 0;
    padding: 8px 0;
    display: inline-block;
    color: #7f6353;
    font-size: 0.76rem;
    animation: slideTicker 16s linear infinite;
}

@keyframes slideTicker {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid #f8d1b4;
    background: #fff4ea;
    color: #b6512b;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending { background: #fff3df; color: #b77116; }
.status-approved,
.status-active,
.status-claimed,
.status-sold { background: #eafff5; color: #197c5c; }
.status-rejected,
.status-blocked,
.status-expired { background: #ffeceb; color: #b34036; }
.status-open,
.status-replied,
.status-scratched { background: #fff1e4; color: #b45224; }

form {
    margin: 0;
}

label {
    display: block;
    margin: 8px 0 6px;
    font-size: 0.8rem;
    color: #785f4e;
}

input,
select,
textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #edd3be;
    background: #fff;
    color: #2f251f;
    font: inherit;
    padding: 10px 11px;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

.action-stack {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

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

.table th,
.table td {
    text-align: left;
    padding: 8px 6px;
    border-bottom: 1px solid #f1ddcd;
    color: #5e4d41;
}

.table th {
    color: #9a7e6b;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bottom-nav {
    position: sticky;
    bottom: 0;
    margin: 8px;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid #f3d9c6;
    background: rgba(255, 255, 255, 0.95);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    box-shadow: 0 12px 22px rgba(255, 90, 44, 0.14);
    backdrop-filter: blur(10px);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 3px;
    border-radius: 10px;
    color: #8a715f;
    font-size: 0.63rem;
}

.bottom-nav a span {
    width: 23px;
    height: 23px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    font-size: 0.62rem;
    font-weight: 700;
    background: #fff2e7;
    color: #cb5b30;
}

.bottom-nav a.active {
    color: #bf4a22;
    background: #fff1e4;
}

.bottom-nav a.active span {
    color: #fff;
    background: linear-gradient(130deg, var(--brand), var(--brand-soft));
}

.disclaimer {
    margin: 6px 14px 14px;
    font-size: 0.68rem;
    color: #9a816f;
    line-height: 1.4;
}

.inline-disclaimer {
    text-align: center;
}

.guest-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.auth-card {
    width: 100%;
    border-radius: 26px;
    padding: 22px;
    background: #fff;
    border: 1px solid #f2d6c2;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    margin: 0;
    color: #bb4c24;
}

.auth-card p {
    margin: 7px 0 0;
}

.drag-box {
    border: 1px dashed #efb68f;
    background: #fff6ee;
    border-radius: 12px;
    padding: 14px;
    color: #a6724d;
    text-align: center;
    font-size: 0.77rem;
    margin-bottom: 8px;
}

.qr-preview {
    width: min(220px, 100%);
    border-radius: 13px;
    border: 1px solid #efceb7;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(130deg, var(--brand), var(--brand-soft));
    box-shadow: 0 12px 20px rgba(255, 90, 44, 0.3);
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.setting-row strong {
    font-size: 0.78rem;
    color: #3f3229;
}

.split-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.leaderboard-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.podium-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
}

.podium-card {
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #f0d2bb;
    background: #fff8f1;
}

.podium-card.first {
    min-height: 124px;
    background: linear-gradient(155deg, #ffd9bf, #fff2e7);
}

.podium-card.second,
.podium-card.third {
    min-height: 104px;
}

.podium-rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(130deg, var(--brand), var(--brand-soft));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.rank-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-item {
    border-radius: 12px;
    border: 1px solid #f0d7c3;
    background: #fff;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 8px;
}

.rank-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.66rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(130deg, var(--brand), var(--brand-soft));
}

.rank-no {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff2e7;
    color: #cb5d33;
    font-size: 0.67rem;
    font-weight: 800;
}

.referral-box {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid #efcfb8;
    background: #fff8f1;
}

.refer-illustration {
    margin-top: 10px;
    border-radius: 16px;
    border: 1px solid #efcfb7;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 168, 112, 0.35), transparent 38%),
        linear-gradient(140deg, #fff6ef, #ffe8d5);
    min-height: 120px;
    display: grid;
    place-items: center;
    color: #b6562f;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.gift-stage {
    margin-top: 12px;
    border-radius: 18px;
    border: 1px solid #efcdb1;
    background: linear-gradient(160deg, #fff7f0, #ffe8d6);
    padding: 12px;
}

.gift-card-visual {
    border-radius: 16px;
    min-height: 170px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #a44721;
    font-weight: 800;
    letter-spacing: 0.04em;
    background:
        linear-gradient(90deg, rgba(255, 90, 44, 0.16) 48%, rgba(255, 90, 44, 0.36) 48%, rgba(255, 90, 44, 0.36) 52%, rgba(255, 90, 44, 0.16) 52%),
        linear-gradient(140deg, #ffe3cc, #fff5ea 60%);
}

.scratch-left {
    margin-top: 8px;
    font-size: 0.76rem;
    color: #8f715e;
    text-align: center;
}

.leaderboard-tabs .tab-active {
    background: linear-gradient(130deg, var(--brand), var(--brand-soft));
    color: #fff;
    border-color: transparent;
}

.referral-code {
    width: 100%;
    border: 1px solid #efc7aa;
    border-radius: 10px;
    background: #fff;
    padding: 8px 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #8d3719;
    font-size: 0.8rem;
}

.referral-cta {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid #f0c4a2;
    background: #fff;
    color: #bc4b25;
    font-size: 0.68rem;
    font-weight: 700;
    box-shadow: none;
}

.reveal-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.reveal-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 900px) {
    .app-shell {
        width: min(100%, 460px);
    }

    .guest-shell {
        width: min(100%, 440px);
    }
}

@media (max-width: 480px) {
    .leaderboard-tabs,
    .split-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
