:root {
    --background: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f0f5ff;
    --primary: #315efb;
    --primary-dark: #2448c7;
    --text: #182033;
    --text-soft: #687086;
    --border: #dfe5ef;
    --danger: #e5484d;
    --shadow: 0 12px 30px rgba(31, 47, 81, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--background);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Pretendard",
        "Noto Sans KR",
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.app-container {
    width: 100%;
    max-width: 720px;
    min-height: 100vh;
    margin: 0 auto;
    padding:
        max(24px, env(safe-area-inset-top))
        20px
        max(32px, env(safe-area-inset-bottom));
}

.screen {
    width: 100%;
}

.screen-center {
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hidden {
    display: none !important;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto;
    border: 4px solid #dce4f4;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    margin: 18px 0 0;
    text-align: center;
    color: var(--text-soft);
    font-size: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 22px;
    font-size: 30px;
    font-weight: 700;
}

.error-icon {
    color: var(--danger);
    background: rgba(229, 72, 77, 0.1);
}

.status-title {
    margin: 20px 0 0;
    text-align: center;
    font-size: 24px;
}

.status-description {
    margin: 12px 0 24px;
    text-align: center;
    color: var(--text-soft);
    line-height: 1.6;
}

.intro-box {
    text-align: center;
}

.app-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 24px;
    color: #ffffff;
    background: var(--primary);
    font-size: 36px;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(49, 94, 251, 0.25);
}

.intro-label {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.intro-title {
    margin: 0;
    font-size: 30px;
    line-height: 1.35;
    letter-spacing: -0.8px;
}

.intro-description {
    margin: 16px 0 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.7;
}

.register-box {
    width: 100%;
    margin-top: 36px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.input-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
}

.text-input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    font-size: 16px;
}

.text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(49, 94, 251, 0.1);
}

.form-error {
    margin: 10px 0 0;
    color: var(--danger);
    font-size: 13px;
}

.primary-button {
    min-height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 15px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

.primary-button:active {
    background: var(--primary-dark);
    transform: translateY(1px);
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.full-width {
    width: 100%;
    margin-top: 18px;
}

.privacy-notice {
    margin: 18px 0 0;
    color: var(--text-soft);
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
}

.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-label {
    margin: 0 0 7px;
    color: var(--text-soft);
    font-size: 13px;
}

.welcome-title {
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.profile-circle {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 17px;
    color: var(--primary);
    background: var(--surface-soft);
    font-size: 19px;
    font-weight: 800;
}

.summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #315efb,
            #527dff
        );
    box-shadow: 0 18px 35px rgba(49, 94, 251, 0.2);
}

.summary-label {
    margin: 0 0 8px;
    font-size: 13px;
    opacity: 0.8;
}

.summary-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.45;
}

.summary-symbol {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 30px;
    font-weight: 800;
}

.menu-section {
    margin-top: 32px;
}

.section-title {
    margin: 0 0 16px;
    font-size: 18px;
}

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

.menu-card {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    color: var(--text);
    text-align: left;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.menu-card:active {
    transform: scale(0.98);
}

.menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 32px;
    padding: 0 10px;
    border-radius: 11px;
    color: var(--primary);
    background: var(--surface-soft);
    font-size: 12px;
    font-weight: 800;
}

.menu-title {
    margin-top: 20px;
    font-size: 18px;
    font-weight: 800;
}

.menu-description {
    margin-top: 9px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.55;
}

.temporary-message {
    position: sticky;
    bottom: 18px;
    width: 100%;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(24, 32, 51, 0.92);
    text-align: center;
    font-size: 14px;
}

@media (max-width: 420px) {
    .app-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .menu-card {
        min-height: 168px;
        padding: 17px;
    }

    .menu-title {
        font-size: 16px;
    }
}
