/* HabitSchool guest demo and first-value activation surfaces. */

/* 기록 생애주기: 첫 기록 전에는 한 행동만, 초기에는 복잡한 커뮤니티를 접는다. */
#dashboard[data-lifecycle="first"] .dashboard-extra-stack {
    display: none;
}

#dashboard[data-lifecycle="repeat"] .mission-card-enhanced,
#dashboard[data-lifecycle="repeat"] .social-challenge-dashboard-card,
#dashboard[data-lifecycle="repeat"] .dashboard-referral-shortcut,
#dashboard[data-lifecycle="repeat"] .dashboard-more-tools,
#dashboard[data-lifecycle="forming"] .social-challenge-dashboard-card,
#dashboard[data-lifecycle="forming"] .dashboard-referral-shortcut,
#dashboard[data-lifecycle="forming"] .dashboard-more-tools {
    display: none !important;
}

#dashboard[data-lifecycle="first"] .dashboard-action-chip[hidden] {
    display: none !important;
}

.asset-reward-goal-card {
    border: 1px solid #ffd28a;
    background: linear-gradient(145deg, #fffaf0, #fff);
}

.asset-reward-goal-kicker {
    margin-bottom: 5px;
    color: #a85b00;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
}

.asset-reward-goal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.asset-reward-goal-head h3,
.asset-reward-goal-head p {
    margin: 0;
}

.asset-reward-goal-head p {
    margin-top: 5px;
    color: #725f50;
    font-size: 13px;
    line-height: 1.45;
}

#asset-reward-remaining {
    flex: 0 0 auto;
    color: #d86400;
    font-size: 13px;
}

.asset-reward-progress {
    height: 10px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #f2e8db;
}

#asset-reward-progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff9d2f, #ff6f00);
    transition: width .25s ease;
}

.asset-reward-estimate {
    margin-top: 9px;
    color: #76695f;
    font-size: 12px;
}

.asset-advanced-details {
    margin: 14px 0 24px;
    border: 1px solid #e5e0da;
    border-radius: 16px;
    background: #faf9f7;
}

.asset-advanced-details > summary {
    min-height: 44px;
    padding: 14px 16px;
    cursor: pointer;
    color: #5d554f;
    font-size: 14px;
    font-weight: 800;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* 펼쳐지는 섹션임을 바로 알 수 있도록 회전하는 화살표 표시 */
.asset-advanced-details > summary::-webkit-details-marker { display: none; }
.asset-advanced-details > summary::after {
    content: '▼';
    font-size: 12px;
    color: #b0864d;
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}
.asset-advanced-details[open] > summary::after {
    transform: rotate(180deg);
}

.asset-advanced-body {
    padding: 0 8px 8px;
}

@media (prefers-reduced-motion: reduce) {
    #asset-reward-progress-fill,
    .wallet-minichart-bar {
        transition: none;
    }
}

html.guest-demo-active:not(.guest-auth-prompt-open) #login-modal {
    display: none !important;
}

html.guest-demo-active.guest-auth-prompt-open #login-modal {
    display: flex !important;
}

html.guest-demo-active #date-ui,
html.guest-demo-active #submit-bar,
html.guest-demo-active #chat-banner {
    display: none !important;
}

html.guest-demo-active #user-greeting,
html.guest-demo-active .tab-btn.active {
    color: #8a4700;
}

html.guest-demo-active .tab-btn {
    color: #616161;
}

html.guest-demo-active .tab-btn.active {
    border-bottom-color: #8a4700;
}

html.guest-demo-active .content-section > :not(.guest-demo-host) {
    display: none !important;
}

.guest-demo-host {
    width: 100%;
    min-height: calc(100vh - 150px);
    padding: 14px 14px 32px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #fffaf0 0%, #fff 38%);
}

.guest-demo-surface {
    display: grid;
    gap: 14px;
    color: #3e332e;
}

.guest-demo-notice {
    position: sticky;
    top: 96px;
    z-index: 28;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 9px;
    padding: 11px 13px;
    border: 1px solid #ffc66d;
    border-radius: 14px;
    background: rgba(255, 248, 225, 0.96);
    box-shadow: 0 5px 18px rgba(108, 75, 24, 0.1);
    backdrop-filter: blur(9px);
    font-size: 12px;
    line-height: 1.45;
}

.guest-demo-notice strong {
    color: #c45100;
    font-size: 13px;
}

.guest-demo-coach {
    position: relative;
    padding: 16px;
    border-radius: 16px;
    color: #24352c;
    background: #eefaf1;
    border: 1px solid #a9dfb6;
}

.guest-demo-coach::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 28px;
    width: 14px;
    height: 14px;
    border-right: 1px solid #a9dfb6;
    border-bottom: 1px solid #a9dfb6;
    background: #eefaf1;
    transform: rotate(45deg);
}

.guest-demo-coach strong,
.guest-demo-coach p {
    display: block;
    margin: 0;
}

.guest-demo-coach p {
    margin-top: 5px;
    color: #53685c;
    font-size: 13px;
    line-height: 1.5;
}

.guest-demo-coach-actions {
    display: flex;
    gap: 8px;
    margin-top: 11px;
}

.guest-demo-coach-actions button {
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #84c696;
    border-radius: 11px;
    color: #276239;
    background: #fff;
    font-weight: 700;
}

.guest-demo-coach-active [data-guest-demo-coach-target] {
    outline: 3px solid rgba(71, 169, 96, 0.3);
    outline-offset: 3px;
}

.guest-demo-content {
    display: grid;
    gap: 14px;
}

.guest-demo-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 16px;
    border: 1px solid #eadfd6;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(70, 47, 30, 0.08);
}

.guest-demo-card > img,
.guest-demo-gallery-card .guest-demo-media-button img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    background: #f5f1ed;
}

.guest-demo-card h2,
.guest-demo-card p,
.guest-demo-card dl {
    margin: 10px 0 0;
}

.guest-demo-card h2 {
    padding-right: 78px;
    font-size: 19px;
    line-height: 1.35;
}

.guest-demo-card p,
.guest-demo-card dd {
    color: #6b5d55;
    font-size: 13px;
    line-height: 1.55;
}

.guest-demo-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.guest-demo-card dl div {
    padding: 10px;
    border-radius: 12px;
    background: #faf6f2;
}

.guest-demo-card dt {
    color: #6f625b;
    font-size: 11px;
}

.guest-demo-card dd {
    margin: 3px 0 0;
    color: #3f342e;
    font-weight: 800;
}

.guest-demo-example-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 2px 9px;
    border-radius: 999px;
    color: #9b3b00;
    background: #fff0d9;
    border: 1px solid #ffc47c;
    font-size: 11px;
    font-weight: 800;
}

.guest-demo-card > .guest-demo-example-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
}

.guest-demo-card-actions,
.guest-demo-primary-cta,
.first-record-next-actions {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.guest-demo-button,
.guest-demo-link-button,
.guest-demo-entry-btn,
.first-record-primary,
.first-record-secondary {
    min-height: 44px;
    border-radius: 12px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.guest-demo-button {
    padding: 10px 13px;
    border: 1px solid #e1d3c8;
    color: #5b4638;
    background: #fff;
}

.guest-demo-button-primary,
.first-record-primary {
    padding: 11px 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #ff9400, #ef6c00);
    box-shadow: 0 6px 15px rgba(239, 108, 0, 0.2);
}

.guest-demo-link-button {
    padding: 8px 10px;
    border: 0;
    color: #a44812;
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.guest-demo-complete {
    padding: 11px 12px;
    border-radius: 12px;
    color: #22663a !important;
    background: #e9f8ee;
    font-weight: 800;
}

.guest-demo-ai-result,
.guest-demo-activity-signal {
    padding: 12px 13px;
    border-radius: 13px;
    background: #eef6ff;
    border: 1px solid #c8e0fb;
}

.guest-demo-activity-signal {
    margin: 0;
    color: #315b7b;
    font-size: 12px;
    line-height: 1.5;
}

.guest-demo-filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.guest-demo-filter .guest-demo-button {
    min-width: 0;
    padding-inline: 4px;
}

.guest-demo-gallery-grid,
.guest-demo-progress-grid {
    display: grid;
    gap: 12px;
}

.guest-demo-gallery-card {
    padding: 0;
}

.guest-demo-gallery-card header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 9px;
    align-items: center;
    padding: 13px 14px;
}

.guest-demo-gallery-card header .guest-demo-example-badge {
    grid-row: 1 / span 2;
}

.guest-demo-gallery-card header span:not(.guest-demo-example-badge) {
    color: #6f625b;
    font-size: 11px;
}

.guest-demo-media-button {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.guest-demo-gallery-card .guest-demo-media-button img {
    border-radius: 0;
}

.guest-demo-card-body {
    padding: 14px;
}

.guest-demo-card-body button {
    min-height: 44px;
    margin-right: 6px;
    border: 0;
    border-radius: 11px;
    background: #fff4e5;
    color: #8f410b;
    font-weight: 750;
}

.guest-demo-card-body button[aria-pressed='true'] {
    background: #ffdfb6;
    color: #6e2d00;
}

.guest-demo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-content: center;
    gap: 12px;
    padding: 20px;
    background: rgba(28, 22, 19, 0.88);
}

.guest-demo-lightbox > button {
    justify-self: end;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 28px;
}

.guest-demo-lightbox img {
    display: block;
    width: min(86vw, 430px);
    max-height: 68vh;
    object-fit: contain;
    border-radius: 16px;
}

.guest-demo-lightbox p {
    margin: 0;
    color: #fff;
    text-align: center;
}

.guest-demo-summary-card,
.guest-demo-balance-card {
    color: #fff;
    background: linear-gradient(135deg, #6c3bc4, #9a64ed);
    border: 0;
}

.guest-demo-summary-card p,
.guest-demo-balance-card p {
    color: rgba(255, 255, 255, 0.84);
}

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

.guest-demo-asset-grid > div {
    min-width: 0;
    padding: 12px 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.12);
    text-align: center;
}

.guest-demo-asset-grid span,
.guest-demo-asset-grid strong {
    display: block;
}

.guest-demo-asset-grid span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
}

.guest-demo-asset-grid strong {
    margin-top: 4px;
    color: #fff;
    font-size: clamp(17px, 5vw, 21px);
    white-space: nowrap;
}

.guest-demo-token-card {
    border-color: #d8cdfa;
    background: linear-gradient(180deg, #faf8ff 0%, #f2edff 100%);
}

.guest-demo-token-card .guest-demo-button-primary {
    width: 100%;
    margin-top: 14px;
    background: linear-gradient(135deg, #6c3bc4, #8a54dd);
}

.guest-demo-progress-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    align-items: center;
}

.guest-demo-progress-card .guest-demo-example-badge {
    position: static;
    grid-column: 1 / -1;
    justify-self: start;
}

.guest-demo-coupon-card progress {
    width: 100%;
    height: 12px;
    margin: 13px 0;
    accent-color: #ff8c00;
}

/* Activation sheets */
.onboarding-habit-sheet,
.first-record-result-sheet {
    max-width: 390px;
    width: calc(100% - 28px);
    padding: 24px 20px;
    border-radius: 22px;
}

.onboarding-habit-icon {
    margin-bottom: 4px;
    font-size: 42px;
}

.onboarding-kicker,
.first-record-result-kicker {
    color: #ef6c00;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.onboarding-habit-sheet h3,
.first-record-result-sheet h3 {
    margin: 7px 0;
    color: #3e2d25;
    font-size: 21px;
    line-height: 1.35;
}

.onboarding-habit-desc {
    margin: 0 0 16px;
    color: #74645b;
    font-size: 13px;
    line-height: 1.55;
}

.onboarding-habit-grid {
    display: grid;
    gap: 9px;
}

.onboarding-habit-choice {
    min-height: 64px;
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    padding: 10px 13px;
    border: 2px solid #e9dfd8;
    border-radius: 14px;
    color: #46372f;
    background: #fff;
    text-align: left;
}

.onboarding-habit-choice > span {
    grid-row: 1 / span 2;
    font-size: 25px;
}

.onboarding-habit-choice small {
    color: #84756c;
}

.onboarding-habit-choice[aria-pressed='true'] {
    border-color: #ff8c00;
    background: #fff7e9;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.12);
}

.onboarding-welcome-gift {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1px 8px;
    margin-top: 14px;
    padding: 11px 12px;
    border-radius: 13px;
    color: #7c3d08;
    background: #fff2d6;
}

.onboarding-welcome-gift span {
    grid-row: 1 / span 2;
}

.onboarding-welcome-gift small {
    color: #8f694a;
}

.onboarding-start-btn {
    width: 100%;
    min-height: 48px;
    margin-top: 14px;
}

.first-record-result-list {
    display: grid;
    gap: 7px;
    margin: 17px 0;
}

.first-record-result-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 11px;
    background: #faf6f2;
}

.first-record-result-list dt {
    color: #75665e;
    font-size: 13px;
}

.first-record-result-list dd {
    margin: 0;
    color: #3b2d26;
    font-weight: 900;
}

.first-record-next-actions {
    grid-template-columns: 1fr 1fr;
}

.first-record-secondary {
    border: 1px solid #d9ccc4;
    color: #63544c;
    background: #fff;
}

button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(29, 110, 220, 0.45);
    outline-offset: 2px;
}

body.dark-mode .asset-reward-goal-card,
body.dark-mode .asset-advanced-details {
    border-color: #3b352f;
    background: #1e1e2e;
}

body.dark-mode .asset-reward-goal-head h3,
body.dark-mode #asset-reward-remaining,
body.dark-mode .asset-advanced-details > summary {
    color: #f4e8dc;
}

body.dark-mode .asset-reward-goal-kicker,
body.dark-mode .asset-reward-goal-head p,
body.dark-mode .asset-reward-estimate {
    color: #cdbba9;
}

body.dark-mode .asset-reward-progress {
    background: #3b352f;
}

body.dark-mode .wallet-convert-card h3 {
    color: #f3c38a;
}

body.dark-mode .wallet-convert-desc {
    color: #d5b88c;
}

body.dark-mode .wallet-convert-limit,
body.dark-mode .wallet-convert-limit-reset {
    color: #b9aa9d;
}

@media (min-width: 720px) {
    .guest-demo-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .guest-demo-surface *,
    .onboarding-habit-sheet *,
    .first-record-result-sheet * {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}
