* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #f4a57a;
    --primary-dark: #e8956a;
    --bg: #fef7f0;
    --bg-card: #ffffff;
    --bg-input: #fdf4ed;
    --text: #5c4a3d;
    --text-secondary: #9a8a7c;
    --border: #f0e6dc;
    --success: #7bc67e;
    --danger: #e57373;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.app {
    max-width: 500px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
    overscroll-behavior-y: contain;
}

/* Pull to Refresh */
.pull-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    z-index: 1000;
}

.pull-indicator.visible {
    transform: translateX(-50%) translateY(20px);
}

.pull-indicator.refreshing {
    transform: translateX(-50%) translateY(20px);
}

.pull-indicator svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    transition: transform 0.2s ease;
}

.pull-indicator.refreshing svg {
    animation: spin 1s linear infinite;
}

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

/* 인증 화면 */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    padding-bottom: 44px;
    background: var(--bg);
    z-index: 100;
}

.auth-container {
    width: 100%;
    max-width: 320px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.auth-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form input {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 15px;
    outline: none;
}

.auth-form input:focus {
    box-shadow: 0 0 0 2px var(--primary);
}

.auth-form .btn-primary {
    margin-top: 4px;
    padding: 12px 20px;
}

/* 홈화면 추가 버튼 */
.install-btn {
    width: 100%;
    margin-top: 12px;
    padding: 14px 24px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.install-btn:hover {
    background: var(--primary-dark);
}

.install-btn-main {
    margin-top: 0;
    margin-bottom: 16px;
}

.auth-error {
    color: var(--danger);
    font-size: 14px;
    text-align: center;
    min-height: 20px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.email-check,
.nickname-check,
.password-match {
    font-size: 13px;
    margin: -8px 0 0 4px;
    min-height: 18px;
}

.email-check.available,
.nickname-check.available,
.password-match.match {
    color: var(--success);
}

.email-check.taken,
.nickname-check.taken,
.password-match.mismatch {
    color: var(--danger);
}

/* 헤더 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 16px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.header-logo .logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.header-btns {
    display: flex;
    gap: 4px;
}

.user-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 8px;
}

/* 알림 권한 요청 배너 */
.notification-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary), #f7b89c);
    color: white;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.notification-prompt span {
    flex: 1;
}

.prompt-btn {
    padding: 6px 16px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.prompt-btn:hover {
    opacity: 0.9;
}

.prompt-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 4px;
}

.prompt-close:hover {
    opacity: 1;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-card);
    color: var(--text);
}

.btn-icon svg {
    width: 22px;
    height: 22px;
}

/* 할 일 입력 */
.add-todo {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.add-todo input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 16px;
    outline: none;
}

.add-todo input::placeholder {
    color: var(--text-secondary);
}

.add-todo input:focus {
    box-shadow: 0 0 0 2px var(--primary);
}

/* 버튼 */
.btn-primary {
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    padding: 8px 16px;
    background: var(--bg-input);
    color: var(--text);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-outline {
    padding: 10px 20px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* 할 일 목록 */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 32px;
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}

.empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 60px 20px;
}

.empty-icon {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* 할 일 아이템 */
.todo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
}

.todo-item.completed {
    opacity: 0.6;
}

.todo-item.completed .todo-title {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.todo-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .todo-checkbox:hover {
        border-color: var(--primary);
    }
}

.todo-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
}

.todo-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.todo-content {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.todo-title {
    font-size: 16px;
    font-weight: 500;
    word-break: break-word;
}

.todo-reminder {
    font-size: 12px;
    color: var(--primary);
    margin-top: 4px;
}

.todo-alarm {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    opacity: 0.5;
}

.todo-alarm:hover {
    opacity: 1;
}

.todo-alarm.active {
    color: var(--primary);
    opacity: 1;
}

.todo-delete {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    opacity: 1;
}


.todo-alarm.active {
    opacity: 1;
}

.todo-delete:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-content.modal-small {
    max-width: 320px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 18px;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
    overflow-x: hidden;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.modal-footer .btn-primary {
    width: 100%;
}

/* 설정 */
.setting-group {
    margin-bottom: 24px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.setting-row label {
    font-size: 16px;
    font-weight: 500;
}

.setting-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.setting-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.time-input {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: none;
    border-radius: 8px;
    color: var(--text);
    font-size: 16px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.test-buttons {
    display: flex;
    gap: 12px;
}

.test-buttons button {
    flex: 1;
}

/* 토글 스위치 */
.switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-input);
    border-radius: 28px;
    transition: 0.3s;
}

.slider::before {
    position: absolute;
    content: '';
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked + .slider {
    background: var(--primary);
}

.switch input:checked + .slider::before {
    transform: translateX(24px);
}

/* 통계 */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stats-summary .loading {
    grid-column: 1 / -1;
}

.stats-card {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.stats-card .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stats-card .label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stats-calendar {
    margin-bottom: 20px;
}

.stats-month-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.stats-day {
    aspect-ratio: 1;
    border-radius: 4px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.stats-day.empty {
    background: transparent;
}

.stats-day.has-data {
    background: #a8e6cf;
    color: #1a1a2e;
}

.stats-day.rate-50 {
    background: #7dd3a8;
    color: #1a1a2e;
}

.stats-day.rate-75 {
    background: #52c48a;
    color: #fff;
}

.stats-day.rate-100 {
    background: #2ecc71;
    color: #fff;
    font-weight: 600;
}

.stats-day.today {
    border: 2px solid var(--primary);
}

.stats-list {
    max-height: 200px;
    overflow-y: auto;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 8px;
}

.stats-item .date {
    font-size: 14px;
    color: var(--text-secondary);
}

.stats-item .result {
    font-size: 14px;
    font-weight: 600;
}

.stats-item .result.perfect {
    color: var(--success);
}

.stats-item .progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    margin: 0 12px;
    overflow: hidden;
}

.stats-item .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s;
}

.stats-item .progress-fill.perfect {
    background: var(--success);
}

.stats-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
}

.stats-item-wrap {
    margin-bottom: 8px;
}

.stats-item-wrap .stats-item {
    margin-bottom: 0;
}

.stats-item.expandable {
    cursor: pointer;
}

.expand-icon {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.2s;
    margin-left: 4px;
}

.stats-item.expanded .expand-icon {
    transform: rotate(180deg);
}

.stats-todos {
    display: none;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 0 0 8px 8px;
    margin-top: -4px;
}

.stats-todos.expanded {
    display: block;
}

.stats-todo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text);
}

.stats-todo.completed {
    color: var(--text-secondary);
    text-decoration: line-through;
}

.stats-todo-check {
    font-size: 12px;
    color: var(--text-secondary);
}

.stats-todo.completed .stats-todo-check {
    color: var(--success);
}

/* 푸터 */
.app-footer {
    text-align: center;
    padding: 12px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 101;
}

.copyright {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.6;
}

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

.copyright a:hover {
    text-decoration: underline;
}

.footer-badges {
    margin-bottom: 8px;
}

.footer-badges a {
    text-decoration: none;
}

.store-badge {
    height: 40px;
    transition: opacity 0.2s;
}

.store-badge:hover {
    opacity: 0.8;
}

.footer-links {
    margin-top: 4px;
}

.footer-divider {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.4;
    margin: 0 4px;
}

.footer-link {
    display: inline;
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.6;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* 계정 삭제 */
.delete-account-section {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 16px;
}

.btn-danger {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

/* 언어 선택 (설정 모달 내) */
.lang-switch-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.lang-btn:hover {
    color: var(--text);
    background: var(--bg-input);
}

.lang-btn.active {
    color: var(--primary);
    font-weight: 600;
    background: var(--bg-input);
}

.lang-divider {
    color: var(--border);
    font-size: 12px;
}

/* ===== 하단 네비게이션 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 200;
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.nav-tab.active {
    color: var(--primary);
}

.nav-tab svg {
    width: 22px;
    height: 22px;
}

/* 탭 콘텐츠 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== 채팅 UI ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px - 56px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    margin: 0 -16px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

/* 환영 메시지 */
.chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.chat-welcome-icon {
    margin-bottom: 12px;
}

.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.chat-welcome h3 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

.chat-welcome p {
    font-size: 14px;
    line-height: 1.5;
}

/* 메시지 버블 */
.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
    animation: chatFadeIn 0.2s ease;
}

@keyframes chatFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
    align-self: flex-start;
    background: var(--bg-card);
    color: var(--text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 어시스턴트 메시지 내 마크다운 */
.chat-bubble.assistant strong { font-weight: 600; }
.chat-bubble.assistant em { font-style: italic; }
.chat-bubble.assistant code {
    background: var(--bg-input);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 13px;
}
.chat-bubble.assistant ul,
.chat-bubble.assistant ol {
    margin: 4px 0;
    padding-left: 20px;
}
.chat-bubble.assistant li { margin: 2px 0; }
.chat-bubble.assistant p { margin: 4px 0; }
.chat-bubble.assistant p:first-child { margin-top: 0; }
.chat-bubble.assistant p:last-child { margin-bottom: 0; }

/* 메시지 타임스탬프 */
.chat-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    opacity: 0.7;
}

.chat-bubble.user + .chat-time {
    text-align: right;
}

/* 도구 실행 카드 */
.chat-tool-card {
    align-self: flex-start;
    max-width: 85%;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 10px;
    border-left: 3px solid var(--primary);
    font-size: 13px;
    color: var(--text-secondary);
    animation: chatFadeIn 0.2s ease;
}

.chat-tool-name {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 2px;
}

.chat-tool-detail {
    font-size: 12px;
    opacity: 0.8;
}

/* 타이핑 인디케이터 */
.chat-typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.chat-typing span {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingDot 1.4s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

/* 입력바 */
.chat-input-bar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    position: fixed;
    bottom: 48px;
    left: 0;
    right: 0;
    z-index: 199;
}

.chat-input-bar textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-input);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    line-height: 1.4;
    resize: none;
    outline: none;
    max-height: 120px;
    overflow: hidden;
}

.chat-input-bar textarea:focus {
    border-color: var(--primary);
}

.chat-input-bar textarea::placeholder {
    color: var(--text-secondary);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, opacity 0.2s;
}

.chat-send-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.chat-send-btn:not(:disabled):hover {
    background: var(--primary-dark);
}

/* 채팅 로딩 (스크롤업 히스토리) */
.chat-load-more {
    text-align: center;
    padding: 8px;
}

.chat-load-more button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 12px;
}

/* 반응형 */
@media (max-width: 400px) {
    .app {
        padding: 12px;
    }

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

    .add-todo {
        flex-direction: column;
    }

    .add-todo .btn-primary {
        width: 100%;
    }

    .auth-screen {
        padding: 16px;
    }

    .auth-logo {
        font-size: 24px;
    }

    .auth-logo-img {
        width: 40px;
        height: 40px;
    }

    .auth-form input {
        padding: 12px 14px;
    }

    .btn-primary {
        padding: 12px 20px;
    }
}
