
:root {
    --surface: #ffffff;
    --text: #000000;
    --muted: #5E5D5E;
    --line: #e5e7eb;
    --primary: #340EC1; /*메인*/
    --blue: #2563eb;
    --teal: #0f766e;
    --green: #16a34a;
    --orange: #f97316;
    --pink: #db2777;
    --gold: #ca8a04;
    --red: #F42A39;
    --gray: #F7F9FA; /*공식 회색 배경색*/

    --border-radius: 10px;
    --border-color: #E7E8E9
}

p, a, span, div, table, tr, td, th, input, select, textarea, button, label, h1, h2, h3, h4, h5, h6, ul, ol, li{
    color: #000000; 
    line-height: 1.5;
}



.txt_pri {
    color: var(--primary);
    font-weight: 800;
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-size: 16px;
}



html,
body {
    min-height: 100%;
    touch-action: pan-x pan-y;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: #ffffff;
    color: var(--text);
    font-family: 'Pretendard', sans-serif;
    letter-spacing: 0;
}

button,
input,
textarea {
    font: inherit;
    touch-action: manipulation;
}

.display_flex {
    display: flex;
}

.points-total {
    display: flex;
    justify-content: space-between;
    background-color: var(--primary); 
    border-radius: 5px;
    padding: 23px 20px;
    margin-bottom: 15px;
}
 
.points-total * {
    font-weight: 600;
    color: #fff;
}

 .ph-content.bg_pri .points-total {
    background-color: var(--primary);
 }

/* Login style */
.loginBtn {
     padding: 7px 14px;
    border-radius: 100px;
    background: var(--primary);
    color: #ffffff;
    font-size: 13px;
    height: 30px;
    line-height: 10px;
    font-weight: 900;
    margin-top: 5px;
}

.arrow_d {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url(../images/down_arrow.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}


.center {
    text-align: center;
}


.grid-flex {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.app-shell,
.app-container,
.screen,
.page,
.page-scroll {
    touch-action: pan-x pan-y;
}

button {
    cursor: pointer;
    border: 0;
    background: none;
    color: inherit;
}

.icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    color: #b5b5b5;
}

.mini-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.arrow-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    vertical-align: -5px;
    color: var(--muted);
}

.app-shell {
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    padding: 0;
    position: relative;
    background: #fff;
}

.app-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    min-height: 100dvh;
    height: 100dvh;
    background: #fff;
    overflow: hidden;
}

.screen {
    height: 100%;
    padding-top: env(safe-area-inset-top);
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
    background: #fff;
}

.page {
    display: none;
    height: 100%;
    background: #ffffff;
}

.page.is-active {
    display: block;
}

.page-scroll {
    height: 100%;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: none;
}

.page-scroll::-webkit-scrollbar,
.recent-row::-webkit-scrollbar {
    display: none;
}

.top-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--surface); 
}

.brand,
.brand-mark,
.icon-button,
.section-title,
.bottom-nav {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px; 
}

.brand strong {
    font-size: 20px;
}

.brand-mark {
    width: 30px;
    height: 30px;
    justify-content: center;
    border-radius: 100%;
    color: #ffffff;
    background: #000;
}

.brand-mark img {
    width: 70%;
    height: auto;
}

.icon-button {
    width: 40px;
    height: 40px;
    justify-content: center;
    border-radius: 12px;
    position: relative;
    color: #475569;
}

.dot {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--red);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
}

.bottom-nav a .btm_label {
    color: #D1D3D4;
    font-size: 15px;
    font-weight: 700;
}
.bottom_icon-wrap {
     background-color: #D1D3D4;
    border-radius: 100%;
    width: 29px;
    height: 29px;
    text-align: center;
    line-height: 2.4;
}

img.bottom_icon {
    width: 70%;
    height: auto;
}

.is-active .bottom_icon-wrap {
    background-color: #000;
}
.is-active .btm_label {
    color: #000;
}

 /* 달력 */
.calender {
    position: relative;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url('../images/down_arrow.png');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 30px;
}

.calender::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}



/* 혜택 페이지 [출석체크,미션, 포인트 내역 등] 스타일 */

.icon_style {
    width: 35px;
    height: auto;
}   

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

.quick-grid.compact {
    margin: 12px 0 0;
}

.quick-grid-icon {
    width: 100%;
    text-align: right;
}
 
.today-mission .grid-flex {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.today-mission .grid-flex span {
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: flex-start;
    justify-content: space-between;
    color: var(--red);
    font-size: 14px;
    font-weight: 500;
}
.quick-card {
    position: relative;
    overflow: hidden;
    min-height: 130px;
    padding: 15px;
    border-radius: var(--border-radius);
    color: var(--primary);
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items:stretch; 
    justify-content: center;
    font-weight: 800;
    text-align: left;
    text-shadow: none;
} 
 

.quick-card .quick-icon,
.quick-card strong,
.quick-card em {
    position: relative;
    color: var(--text);
    z-index: 1;
}

.quick-card.tone-pink {
 border: 1.5px solid #FEB7B7;
}

.quick-card.tone-gray {
    border: 1.5px solid var(--border-color);
}

.quick-card.tone-gray p { 
    color: var(--red);
}
 
.quick-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: currentColor;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .16), inset 0 -10px 20px rgba(15, 23, 42, .18);
}

.quick-icon .icon {
    width: 24px;
    height: 24px;
    color: #ffffff;
    stroke-width: 2.6;
}

.quick-card strong {
    display: block;  
    font-weight: 600; 
    font-size: 17px;
}

.quick-card em {
    display: block;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.mission-strip,
.profile-card  {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.attendance {
    min-width: 82px;
    padding: 12px;
    border-radius: 14px;
    background: #f1f5f9;
    text-align: center;
}

.attendance span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.attendance strong {
    display: block;
    margin-top: 4px;
    color: var(--primary);
    font-size: 24px;
}

.banner-wrap {
    position: relative;
    height: auto;
    aspect-ratio: 2 / 1;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 5px;
}

.ad-banner {
    position: absolute;
    inset: 0;
    padding: 22px;
    color: #ffffff;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    border-radius: 5px;
    text-shadow: 0 2px 6px rgba(15, 23, 42, .55);
}

.banner-wrap .ad-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.ad-banner h2,
.ad-banner strong,
.ad-banner p,
.ad-label {
    position: relative;
    z-index: 1;
}

.ad-banner.is-active {
    transform: translateX(0);
}

.ad-banner.has-image {
    overflow: hidden;
}

.ad-banner h2 {
    margin: 18px 0 4px;
    font-size: 20px;
    line-height: 1.25;
    color: #ffffff;
    font-weight: 900;
}

.ad-banner strong {
    display: block;
    font-size: 16px;
    color: #ffffff;
    font-weight: 900;
}

.ad-banner p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .94);
    opacity: 1;
    font-size: 13px;
    font-weight: 700;
}

.ad-label {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #111827;
    text-shadow: none;
    font-size: 11px;
    font-weight: 900;
}

.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    display: flex;
    gap: 6px;
    transform: translateX(-50%);
}

.banner-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
    box-shadow: 0 1px 4px rgba(15, 23, 42, .35);
}

.banner-dots button.is-active {
    width: 20px;
    background: #fff;
}
 
.section-block {
    margin-bottom: 16px;
}

.section-title {
    justify-content: space-between;
    gap: 10px;
    padding: 30px 0 20px;
}

.my_page .section-title {
    padding: 0;
    margin: 30px 0 20px 0;

}

.section-title h2 {
    margin: 0;
    font-size: 17px;
}

.section-title span,
.link-button {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    width: 70px;
    text-align: right;
}

.today_mission-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.today_mission-grid .mission-icon img {
    width: 35px;
    height: auto;
}

/* 스페셜 미션 스타일 */
.special_mission-grid {  
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}
.special_mission-grid .grid-flex {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 21px;
}

.special_mission-grid .mission-card {
        background: #fff;
    border: none;
}


.special_mission-grid .mission-icon {
    background-color: var(--gray);
    border-radius: 50px;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
}
 .special_mission-grid .mission-icon img {
    width: 35px;
    height: auto;
}


.special_mission-grid .sub_tit {
    color: var(--red);
    font-size: 14px;
    font-weight: 600;
}

.mission-card {
    position: relative;
    min-height: auto;
    padding: 14px;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: var(--gray);
    border: 1.5px solid var(--border-color);
    outline: none;
    text-align: left; 
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; 
}
 
.mission-card:active,
.quick-card:active {
    transform: scale(.98);
}



.mission-card strong,
.mission-card em {
    position: relative;
    display: block;
}

.mission-card strong { 
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.mission-card em {
    width: fit-content;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
    color: #1e293b;
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(220, 38, 38, .28);
}


.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.list-header h1 {
    margin: 0;
    font-size: 20px;
}



.recent-image {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: #ffffff;
    flex: 0 0 auto;
    text-shadow: 0 1px 2px rgba(15, 23, 42, .48);
}

.recent-image .icon,
.recent-image .mini-icon {
    position: relative;
    z-index: 1;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}


.mission-strip {
    padding: 16px;
    margin-bottom: 14px;
}

.mission-strip h2 {
    margin: 0;
    font-size: 17px;
}

.mission-strip p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}
  
.history-list {
    display: grid;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.history-item[hidden] {
    display: none;
}

.history-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
}

.history-text {
    min-width: 0;
    flex: 1;
}

.history-text strong,
.history-text em,
.history-text small {
    display: block;
}

.history-text strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.history-text em,
.history-text small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.history-point {
    font-size: 14px;
    font-weight: 900;
}

.history-point.plus {
    color: var(--green);
}

.history-point.minus {
    color: var(--red);
}

.history-point.zero {
    color: #64748b;
}

.more-button {
    width: 100%;
    margin-top: 12px;
    background: #f1f5f9;
    color: #334155;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    margin-bottom: 12px;
}

.avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #0f766e);
    font-size: 24px;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(15, 23, 42, .42);
}

.avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

.profile-card h1 {
    margin: 0 0 4px;
    font-size: 18px;
}

.profile-card h1 em {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eab308, #f97316);
    color: #111827;
    font-size: 11px;
    font-style: normal;
    text-shadow: none;
    vertical-align: middle;
}

.profile-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
 

.recent-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.recent-card {
    flex: 0 0 140px;
    overflow: hidden; 
    text-align: left; 
}

.recent-image {
    width: 100%;
    height: 100px;
    border: 1px solid var(--line);
}
.recent-card strong {
    display: -webkit-box;
    min-height: 40px;
    padding: 10px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    font-weight: 400;
    color: var(--muted);
}
 

.account-card {
    padding-bottom: 12px;
}

.account-detail-list {
    display: grid;
    gap: 10px;
    padding: 10px 0 2px;
}

.account-detail-item {
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.account-detail-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.account-detail-item span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.account-detail-item strong {
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    line-break: anywhere;
}

.push-settings button > span:first-child,
.push-send-card .send-button {
    display: flex;
    align-items: center;
    gap: 8px;
}

.push-status {
    margin: 8px 0 10px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.push-status.is-error {
    color: var(--red);
}

.push-send-form {
    display: grid;
    gap: 10px;
    padding: 10px 0 4px;
}

.push-send-form label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.push-send-form input[type="text"],
.push-send-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    outline: 0;
    font-size: 16px;
    font-weight: 700;
}

.push-send-form input[type="text"] {
    min-height: 46px;
    padding: 0 12px;
}

.push-send-form textarea {
    min-height: 92px;
    padding: 12px;
    resize: vertical;
}

.push-send-form input[type="text"]:focus,
.push-send-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}

.push-send-form .check-row {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: #475569;
}

.push-send-form .check-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.push-send-card .send-button {
    min-height: 48px;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    background: var(--primary);
    color: #ffffff;
    text-align: center;
    text-shadow: 0 1px 2px rgba(15, 23, 42, .32);
}

.push-send-card .send-button:disabled {
    background: #c4b5fd;
}

.manager-alert {
    margin: 0 0 12px;
    padding: 11px 12px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #166534;
    font-size: 13px;
    font-weight: 900;
}

.manager-alert.is-error {
    background: #fef2f2;
    color: #b91c1c;
}

.map-manager-form {
    display: grid;
    gap: 14px;
    padding-bottom: 24px;
}

.map-manager-panel {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.map-manager-panel h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

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

.manager-grid label,
.manager-checks label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.manager-grid label.is-wide {
    grid-column: 1 / -1;
}

.manager-grid input {
    width: 100%;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    outline: 0;
    font-size: 14px;
    font-weight: 700;
}

.manager-grid input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}

.manager-checks {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.manager-checks label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.manager-checks input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.map-manager-list {
    display: grid;
    gap: 12px;
}

.map-manager-item {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.map-manager-item header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.map-manager-item header strong,
.map-manager-item header span {
    display: block;
}

.map-manager-item header strong {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
}

.map-manager-item header span,
.map-manager-item header em {
    color: #64748b;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.manager-map-preview {
    height: 180px;
    margin-bottom: 0;
}

.manager-save-bar {
    position: sticky;
    z-index: 8;
    bottom: 12px;
    display: grid;
    padding-top: 2px;
}

.manager-save-button {
    min-height: 48px;
    border-radius: 14px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 14px 32px rgba(52, 14, 193, .24);
}

.switch {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: left .2s ease;
}

.switch.is-on {
    background: var(--primary);
}

.switch.is-on::after {
    left: 21px;
}

.footer {
    padding: 8px 0 22px;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

.footer strong,
.footer span {
    display: block;
}

.footer p {
    margin: 8px 0 0;
}

.bottom-nav {
    position: absolute;
    z-index: 25;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(68px + env(safe-area-inset-bottom));
    justify-content: space-around;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav a,
.bottom-nav button {
    flex: 1;
    min-width: 0;
    max-width: 96px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;  
    text-decoration: none;
}

.bottom-nav a.is-active,
.bottom-nav button.is-active {
    color: var(--primary);
}

.bottom-nav button[data-reset-rewards] {
    flex: 0 0 44px;
    max-width: 44px;
    color: #64748b;
}

.bottom-nav .icon {
    width: 23px;
    height: 23px;
}

.quick-card.is-complete,
.mission-card.is-complete {
    color: #64748b;
    /* background: #f1f5f9; */
    border-color: #e2e8f0;
    box-shadow: none;
    cursor: default;
}

.quick-card.is-complete em,
.mission-card.is-complete em {
    background: #e2e8f0;
    color: #475569;
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, .52);
}

.region-modal {
    position: fixed;
    inset: 0;
    z-index: 105;
    display: grid;
    align-items: end;
    justify-items: center;
    padding: 18px 12px calc(18px + env(safe-area-inset-bottom));
    background: rgba(15, 23, 42, .54);
}

.region-modal[hidden] {
    display: none;
}

.region-card {
    width: min(100%, 430px);
    max-height: min(82vh, 680px);
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.region-card header {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.region-card header span {
    display: block;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.region-card h2,
.region-card h3 {
    margin: 0;
    color: #111827;
}

.region-card h2 {
    margin-top: 2px;
    font-size: 18px;
}

.region-current {
    margin: 14px 14px 10px;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.region-current span,
.region-current strong {
    display: block;
}

.region-current span {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.region-current strong {
    margin-top: 4px;
    color: #111827;
    font-size: 16px;
    font-weight: 900;
}

.region-breadcrumb {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 14px 12px;
}

.region-breadcrumb button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.region-breadcrumb button.is-active {
    background: var(--primary);
    color: #ffffff;
}

.region-step-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 8px;
    border-top: 1px solid var(--line);
}

.region-step-title h3 {
    font-size: 15px;
}

.region-step-title button {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.region-options {
    display: grid;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding: 0 14px 16px;
}

.region-option {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    text-align: left;
}

.region-option strong {
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.region-option small {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.region-option.is-all {
    border-color: rgba(52, 14, 193, .25);
    background: #f5f3ff;
}

.region-option.is-selected {
    border-color: var(--primary);
    background: #ede9fe;
}

.reward-result {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(15, 23, 42, .46);
}

.reward-result[hidden] {
    display: none;
}

.reward-result-card {
    width: min(100%, 340px);
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    text-align: center;
}

.reward-result-card p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.reward-result-card h2 {
    margin: 0;
    font-size: 22px;
}

.reward-result-card strong {
    display: block;
    margin-top: 12px;
    color: var(--orange);
    font-size: 40px;
    font-weight: 900;
}

.reward-result-card span {
    display: block;
    margin-top: 6px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.reward-result-card button {
    width: 100%;
    min-height: 46px;
    margin-top: 18px;
    border-radius: 14px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 900;
}

.game-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .58);
}

.game-modal[hidden] {
    display: none;
}

.game-card {
    position: relative;
    width: min(100%, 380px);
    padding: 22px;
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .34);
    text-align: center;
}

.game-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.game-eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.game-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.game-stage {
    position: relative;
    min-height: 230px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    border-radius: 22px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.game-status {
    min-height: 22px;
    margin: 0 0 14px;
    color: #475569;
    font-size: 14px;
    font-weight: 800;
}

.game-action {
    width: 100%;
    min-height: 48px;
    border-radius: 15px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 900;
}

.game-action:disabled {
    background: #c4b5fd;
    color: #ffffff;
}

.game-result {
    position: absolute;
    inset: auto 18px 18px;
    z-index: 5;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .18);
    animation: resultPop .28s ease both;
}

.game-result strong,
.game-result span {
    display: block;
}

.game-result strong {
    color: var(--orange);
    font-size: 34px;
    font-weight: 900;
    line-height: 1.05;
}

.game-card.is-lose .game-result strong {
    color: #475569;
}

.game-result span {
    margin-top: 4px;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.random-box {
    position: relative;
    width: 150px;
    height: 140px;
}

.box-lid,
.box-body {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ec4899, #9d174d);
    box-shadow: 0 12px 28px rgba(157, 23, 77, .24);
}

.box-lid {
    top: 18px;
    width: 132px;
    height: 34px;
    border-radius: 12px 12px 5px 5px;
}

.box-body {
    top: 50px;
    width: 116px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 8px 8px 18px 18px;
    color: #ffffff;
    font-size: 42px;
    font-weight: 900;
}

.random-box.is-playing {
    animation: shakeBox .9s ease-in-out 2;
}

.random-box.is-playing .box-lid {
    animation: openLid 1.4s ease .45s forwards;
}

.box-spark {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #facc15;
    opacity: 0;
}

.box-spark.s1 { left: 26px; top: 16px; }
.box-spark.s2 { right: 24px; top: 38px; background: #22c55e; }
.random-box.is-playing .box-spark { animation: sparkPop .8s ease .65s forwards; }

.dice-cube {
    --dice-size: 124px;
    --dice-half: 62px;
    --dice-end: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    width: var(--dice-size);
    height: var(--dice-size);
    position: relative;
    transform-style: preserve-3d;
    transform: var(--dice-end);
}

.dice-face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 3px solid rgba(255, 255, 255, .92);
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff, #dbeafe);
    color: #0f172a;
    box-shadow: inset 0 -12px 24px rgba(15, 23, 42, .12);
    backface-visibility: hidden;
}

.dice-face span {
    position: absolute;
    top: 8px;
    left: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.dice-face strong {
    position: absolute;
    left: 50%;
    bottom: 10px;
    min-width: 58px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #0f766e;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    transform: translateX(-50%);
    text-shadow: 0 1px 2px rgba(15, 23, 42, .28);
}

.dice-pips {
    position: relative;
    width: 72px;
    height: 72px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.pip {
    width: 13px;
    height: 13px;
    align-self: center;
    justify-self: center;
    border-radius: 50%;
    background: #0f172a;
    box-shadow: inset 0 2px 2px rgba(255, 255, 255, .22);
}

.p1 { grid-area: 1 / 1; }
.p3 { grid-area: 1 / 3; }
.p4 { grid-area: 2 / 1; }
.p5 { grid-area: 2 / 2; }
.p6 { grid-area: 2 / 3; }
.p7 { grid-area: 3 / 1; }
.p9 { grid-area: 3 / 3; }

.face-front { transform: translateZ(var(--dice-half)); }
.face-right { transform: rotateY(90deg) translateZ(var(--dice-half)); }
.face-top { transform: rotateX(90deg) translateZ(var(--dice-half)); }
.face-bottom { transform: rotateX(-90deg) translateZ(var(--dice-half)); }
.face-left { transform: rotateY(-90deg) translateZ(var(--dice-half)); }
.face-back { transform: rotateY(180deg) translateZ(var(--dice-half)); }

.dice-help {
    margin: 20px 0 0;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.dice-cube.is-playing {
    animation: rollDice 1.55s cubic-bezier(.18, .78, .18, 1) forwards;
}

@keyframes resultPop {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shakeBox {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(-6deg) translateX(-4px); }
    40% { transform: rotate(6deg) translateX(4px); }
    60% { transform: rotate(-5deg) translateX(-3px); }
    80% { transform: rotate(4deg) translateX(3px); }
}

@keyframes openLid {
    to { transform: translate(-50%, -34px) rotate(-12deg); }
}

@keyframes sparkPop {
    0% { opacity: 0; transform: scale(.3); }
    45% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: translateY(-28px) scale(.8); }
}

@keyframes rollDice {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateY(0); }
    18% { transform: rotateX(190deg) rotateY(120deg) rotateZ(45deg) translateY(-22px); }
    42% { transform: rotateX(430deg) rotateY(300deg) rotateZ(160deg) translateY(10px); }
    66% { transform: rotateX(650deg) rotateY(520deg) rotateZ(280deg) translateY(-12px); }
    84% { transform: rotateX(790deg) rotateY(680deg) rotateZ(360deg) translateY(3px); }
    100% { transform: var(--dice-end) translateY(0); }
}

.hospital-sheet {
    position: fixed;
    z-index: 90;
    left: 50%;
    bottom: 0;
    width: min(100%, 430px);
    max-height: min(82vh, 720px);
    transform: translateX(-50%);
    overflow: hidden;
    border-radius: 28px 28px 0 0;
    background: var(--surface);
    box-shadow: 0 -20px 50px rgba(15, 23, 42, .24);
}

.hospital-sheet header {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
}

.notification-panel {
    position: fixed;
    z-index: 96;
    right: max(12px, calc((100vw - 960px) / 2 + 12px));
    top: calc(62px + env(safe-area-inset-top));
    width: min(calc(100vw - 24px), 390px);
    max-height: min(72vh, 620px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.notification-panel[hidden] {
    display: none;
}

.notification-panel header {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.notification-panel header span {
    display: block;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.notification-panel h2 {
    margin: 2px 0 0;
    font-size: 18px;
}

.notification-list {
    display: grid;
    gap: 10px;
    max-height: calc(min(72vh, 620px) - 64px);
    overflow-y: auto;
    padding: 12px;
}

.notification-card {
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
}

.notification-card span {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 999px;
    background: #ede9fe;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
}

.notification-card strong,
.notification-card p,
.notification-card em {
    display: block;
}

.notification-card strong {
    margin-top: 8px;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.35;
}

.notification-card p {
    margin: 6px 0 0;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.notification-card em,
.notification-empty {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.notification-card em {
    margin-top: 8px;
}

.notification-empty {
    margin: 12px 0;
    text-align: center;
}

.in-app-notice {
    position: fixed;
    z-index: 130;
    left: 50%;
    top: calc(50px + env(safe-area-inset-top));
    width: min(calc(100vw - 28px), 420px);
    padding: 13px 14px;
    border: 1px solid rgba(124, 58, 237, .22);
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .24);
    text-align: left;
    transform: translateX(-50%) !important;
    animation: resultPop .24s ease both;
}

.in-app-notice[hidden] {
    display: none;
}

.in-app-notice span,
.in-app-notice strong,
.in-app-notice em {
    display: block;
}

.in-app-notice span {
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.in-app-notice strong {
    margin-top: 4px;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.35;
}

.in-app-notice em {
    margin-top: 3px;
    overflow: hidden;
    color: #475569;
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hospital-sheet h2 {
    margin: 0;
    font-size: 17px;
}

.sheet-body {
    max-height: calc(min(82vh, 720px) - 58px);
    overflow-y: auto;
    padding: 16px;
}


.tone-purple {
    color: var(--primary);
    background: linear-gradient(135deg, #7c3aed, #4c1d95);
}

.tone-pink {
    color: var(--pink);
    background: #FCF2F3;
}

.tone-orange {
    color: var(--orange);
    background: linear-gradient(135deg, #ea580c, #9a3412);
}

.tone-green {
    color: var(--green);
    background: linear-gradient(135deg, #16a34a, #166534);
}

.tone-blue {
    color: var(--blue);
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
}

.tone-gold {
    color: var(--gold);
    background: linear-gradient(135deg, #ca8a04, #854d0e);
}

.tone-gray {
    color: var(--text);
    background: linear-gradient(135deg, #F7F9FA, #f4f4f4);
}

.tone-teal,
.tone-mint {
    color: var(--teal);
    background: linear-gradient(135deg, #0f766e, #115e59);
}

 

/* 오늘의 미션 달성률 박스 */
.mission-rate-box {
    padding: 14px 16px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.mission-rate-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mission-rate-info p {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
}

.mission-rate-info span {
    flex-shrink: 0;
    margin-left: 10px;
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
}

.mission-rate-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}

.mission-rate-fill {
    height: 100%;
    width: 0%;
    background: var(--red);
    border-radius: 999px;
    transition: width 0.5s ease;
}

/* sonyi add style */

.sub-header {
    display: flex;
    height: 56px; 
    align-items: center;
    justify-content: flex-start;
    background: var(--surface); 
} 

.sub-scroll {
    height: calc(100% - 56px);
    overflow-y: auto;
    scrollbar-width: none;
}


/* ─── 참여 미션 슬라이더 ───────────────────────────── */
.am-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.am-slider::-webkit-scrollbar {
    display: none;
}

.am-card {
    flex: 0 0 calc(33.33% - 8px);
    scroll-snap-align: start;
    min-height: 120px;
    padding: 14px 10px;
    border-radius: var(--border-radius);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    transition: box-shadow .16s ease;
}

.am-card:active {
    transform: scale(.97);
}

.am-card-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--muted);
}

.am-card-desc {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.3;
}

/* ─── 간단 미션 그리드 ────────────────────────────── */
.sm-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sm-grid::-webkit-scrollbar {
    display: none;
}

.sm-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 6px; 
    transition: transform .16s ease;
}

.sm-item:active {
    transform: scale(.95);
}

.sm-item .mission-icon {
    background: var(--gray);
    width: 80px;
    height: 80px;
    /* display: flex; */
    line-height: 104px;
    align-content: center;
    text-align: center;
    justify-content: center;
}

.sm-icon-wrap {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 70px; 
    background: #F7F9FA; 
}

.sm-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.sm-label {
    font-size: 15px;
    text-align: center;
    line-height: 1.3; 
    font-weight: 500;
    width: max-content;

}

@media (max-width: 520px) {
    .hospital-sheet {
        width: 100%;
        border-radius: 24px 24px 0 0;
    }
}

@media (min-width: 720px) {
   
 
    .bottom-nav {
        left: 50%;
        width: min(100%, 960px);
        transform: translateX(-50%);
        border-left: 1px solid var(--line);
        border-right: 1px solid var(--line);
        border-radius: 18px 18px 0 0;
    }
}

@media (max-width: 350px) {
  
    .today_mission-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }

}
