/* ══════════════════════════════════════════════════════════════════════════
   조용한 스킨 — 인라인 <style> 을 쓰는 페이지들의 공통 상위 레이어
   ══════════════════════════════════════════════════════════════════════════
   index / log_in / sign_up / upload / 404 / admin·backfill 이 이 파일을 링크한다.
   각 페이지의 <style> 뒤에 <link> 로 붙이므로 소스 순서상 여기가 이긴다.

   main.html 은 styles.css 를 쓰고, 그 파일 끝의 "조용한 스킨" 블록이 같은 역할을
   한다. 토큰 값은 두 곳뿐이며 서로 같아야 한다 — 한쪽만 바꾸지 말 것.

   원칙: 웜 본 캔버스, 1px 헤어라인, 거의 없는 그림자, 강조색 하나.
   그라디언트 · 글래스모피즘 · 짙은 그림자 · 알약형 주요 버튼 · 장식 이모지는 쓰지 않는다.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
    /* 강조색은 하나. 채도를 낮춘 슬레이트 블루 — 링크와 활성 상태에만. */
    --accent: #4a6fa5;
    --accent-hover: #3d5c8a;
    --accent-wash: #eef2f8;

    /* 레거시 별칭: 각 페이지의 기존 규칙이 이 이름들을 참조한다. */
    --primary-color: var(--accent);
    --primary-dark: var(--accent-hover);
    --accent-color: var(--accent);
    --gradient-primary: var(--accent);
    --gradient-bg: var(--bg-primary);

    /* 캔버스는 순백 대신 웜 본. 사진 가장자리가 살아난다. */
    --bg-primary: #f7f6f3;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --surface-sunken: #efedea;

    /* 본문은 절대 순검정을 쓰지 않는다. */
    --text-primary: #2f3437;
    --text-secondary: #787774;
    --text-light: #9b9894;
    --border-color: #eaeae8;
    --border-strong: #dedcd8;

    /* 라운드 3단계. 알약형은 태그에만. */
    --radius-image: 8px;
    --radius-card: 12px;
    --radius-button: 6px;
    --border-radius: var(--radius-card);

    /* 그림자 2단계. 거의 보이지 않아야 한다. */
    --shadow-resting: 0 1px 2px rgba(17, 17, 17, .03);
    --shadow-raised: 0 2px 8px rgba(17, 17, 17, .05);
    --shadow-sm: var(--shadow-resting);
    --shadow-md: var(--shadow-resting);
    --shadow-lg: var(--shadow-raised);
    --shadow-xl: var(--shadow-raised);

    /* 4px 배수 간격 */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-6: 24px; --sp-8: 32px; --sp-12: 48px;

    --success-color: #346538;
    --error-color: #9f2f2d;
}

@media (prefers-color-scheme: dark) {
    :root {
        --accent: #8fb0dd;
        --accent-hover: #a7c2e8;
        --accent-wash: #1e2836;

        --bg-primary: #14140f;
        --bg-secondary: #1c1c19;
        --bg-card: #1c1c19;
        --surface-sunken: #242420;

        --text-primary: #ecebe7;
        --text-secondary: #b3b0aa;
        --text-light: #86837d;
        --border-color: #2e2e2a;
        --border-strong: #3a3a35;

        --shadow-resting: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-raised: 0 2px 10px rgba(0, 0, 0, .5);
    }
}

/* ── 캔버스 ──────────────────────────────────────────────────────────────── */

body {
    font-family: 'Pretendard Variable', Pretendard, 'Noto Sans KR',
                 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--bg-primary);
    color: var(--text-primary);
    /* min-height:-webkit-fill-available 가 100dvh 를 덮어써 body 가 뷰포트보다
       짧아지면 배경이 body 박스 크기로 타일링돼 이음매가 보인다. */
    min-height: 100vh;
    min-height: 100dvh;
}

/* 장식 배경 제거 — 콘텐츠가 주인공이다. */
body::before { display: none !important; }
.floating-shapes { display: none !important; }

/* ── 헤더 ────────────────────────────────────────────────────────────────── */

body > header {
    /* 네비 블러는 미니멀 규칙에서 유일하게 허용되는 유리 효과다. 아주 옅게만. */
    background: color-mix(in srgb, var(--bg-primary) 90%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
}

body > header h1 {
    /* 장식체는 헤더 1곳만 허용 — 고운바탕(부드러운 세리프)으로 앨범 표지 느낌.
       이름은 진하게, '디지털앨범'은 한 톤 물러난 라벨로. */
    font-family: 'Gowun Batang', 'Pretendard Variable', serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
    padding-bottom: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

body > header h1 .title-name {
    font-weight: 700;
}

/* 이름과 라벨 사이의 아주 작은 구분점 — 색은 강조색이 아니라 옅은 회색. */
body > header h1 .title-sub::before {
    content: '·';
    color: var(--text-light);
    font-weight: 400;
    margin-right: 8px;
}

body > header h1 .title-sub {
    font-family: 'Pretendard Variable', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--text-secondary);
}

/* ── 카드 ────────────────────────────────────────────────────────────────── */

.login-container,
.container > section > div[style*="background: white"] {
    background: var(--bg-card);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-resting);
    animation: none;
}

.form-section { background: var(--bg-card); }

/* index 왼쪽 패널: 컬러 블록을 걷어내고 사진만 남긴다. */
.image-section {
    background: var(--surface-sunken);
    border-right: 1px solid var(--border-color);
}

.image-section::before { display: none; }

.main-image {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: none;
}

.main-image:hover { transform: none; border-color: var(--border-strong); }

.image-title {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: none;
    margin-top: var(--sp-6);
}

.image-subtitle { color: var(--text-secondary); font-size: 14px; }

/* ── 타이포 ──────────────────────────────────────────────────────────────── */

.welcome-text h1,
.login-header h1,
.signup-header h1 {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.welcome-text p,
.login-header p,
.signup-header p { color: var(--text-secondary); font-size: 14px; }

.app-title {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
}

/* 좌측 정렬로 통일. 가운데/오른쪽이 섞이면 산만해진다. */
.welcome-text,
.login-header,
.signup-header,
.features h3 { text-align: left; }

/* 폼 하단 링크: 한 줄 양끝 정렬, 링크/버튼 폰트 통일, 밑줄 없음 */
.form-links {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
}

.form-links a,
.form-links button {
    align-self: auto !important;
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-secondary);
    text-decoration: none !important;
    cursor: pointer;
}

.form-links a:hover,
.form-links button:hover {
    color: var(--text-primary);
    text-decoration: none !important;
}

/* ── 버튼 ────────────────────────────────────────────────────────────────── */

.btn-primary,
.btn-secondary,
input[type="submit"],
.modal-btn,
label.button {
    animation: none;
    background-size: auto;
    box-shadow: none;
    border-radius: var(--radius-button);
    font-size: 15px;
    font-weight: 500;
    min-height: 44px;
    text-decoration: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.btn::before,
.btn-secondary::before,
.back-btn::before,
label.button::before { display: none !important; }

.btn:hover,
.back-to-home:hover,
label.button:hover { text-decoration: none; }

.btn-primary,
input[type="submit"],
.modal-btn-primary,
label.button {
    background: var(--text-primary);
    color: var(--bg-secondary);
    border: 1px solid var(--text-primary);
}

.btn-primary:hover,
input[type="submit"]:hover:not(:disabled),
.modal-btn-primary:hover,
label.button:hover {
    background: var(--text-primary);
    color: var(--bg-secondary);
    opacity: .88;
    transform: none;
    box-shadow: none;
    border-color: var(--text-primary);
}

.btn-primary:active,
input[type="submit"]:active:not(:disabled),
label.button:active { transform: scale(.98); }

.btn-secondary,
.modal-btn-secondary,
.back-to-home,
.back-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-radius: var(--radius-button);
}

.btn-secondary:hover,
.modal-btn-secondary:hover,
.back-to-home:hover,
.back-btn:hover {
    background: var(--surface-sunken);
    color: var(--text-primary);
    transform: none;
    box-shadow: none;
}

input[type="submit"]:disabled {
    background: var(--surface-sunken);
    border-color: var(--border-color);
    color: var(--text-light);
    opacity: 1;
}

/* ── 입력 ────────────────────────────────────────────────────────────────── */

input[type="email"],
input[type="password"],
input[type="text"],
input[type="datetime-local"],
input[type="date"],
input[type="number"],
select,
textarea {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-button);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    min-height: 44px;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: none;
    transform: none;
}

input::placeholder,
textarea::placeholder { color: var(--text-light); }

.input-group label,
.form-field > small {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-links a,
.form-links button { color: var(--text-secondary); font-size: 13px; }
.form-links a:hover,
.form-links button:hover { color: var(--text-primary); }

/* ── 목록 (index 기능 목록) ──────────────────────────────────────────────── */

.features h3 {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.feature-list { gap: 0; border-top: 1px solid var(--border-color); }

.feature-item {
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding: 14px 2px;
}

.feature-item:last-child { border-bottom: none; }
.feature-item:hover { background: none; transform: none; }
.feature-text { color: var(--text-secondary); font-size: 14px; font-weight: 400; }

/* ── 모달 ────────────────────────────────────────────────────────────────── */

.modal {
    background: rgba(20, 20, 15, .45);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-raised);
    animation: none;
}

/* ── 공통 ────────────────────────────────────────────────────────────────── */

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

input, time, .count, [class*="count"] { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   upload.html — 새 게시물 업로드
   클래스명이 이 페이지에만 존재하므로 공유 파일에 둬도 다른 페이지에 새지 않는다.
   ══════════════════════════════════════════════════════════════════════════ */

body > .container { padding-top: 72px; }

/* 폼 카드: 글래스 → 헤어라인 카드 */
#post-file-form {
    background: var(--bg-card);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-resting);
    padding: var(--sp-6);
    margin: var(--sp-6) 0;
    gap: var(--sp-6);
    animation: none;
}

/* 파일 선택: 그라디언트 버튼 → 점선 드롭존. 이 화면의 주 동작이므로 크게 둔다. */
#post-file-form label.button {
    background: var(--surface-sunken);
    color: var(--text-secondary);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-card);
    padding: var(--sp-8) var(--sp-6);
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

#post-file-form label.button:hover {
    background: var(--accent-wash);
    border-color: var(--accent);
    color: var(--accent-hover);
    opacity: 1;
    transform: none;
}

.form-field small,
.form-field > small {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* 태그·날짜 입력에만 2px 파란 테두리를 주던 규칙을 평평하게 되돌린다. */
#post-file-form input[name="tags"],
#input_tags,
#post-file-form input[type="datetime-local"],
#post-file-form textarea,
#post-file-form input[type="text"] {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-button);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 14px;
    font-size: 15px;
}

#post-file-form input[name="tags"]:focus,
#input_tags:focus,
#post-file-form input[type="datetime-local"]:focus,
#post-file-form textarea:focus,
#post-file-form input[type="text"]:focus {
    border-color: var(--border-strong);
    box-shadow: none;
    transform: none;
    background: var(--bg-secondary);
}

#post-file-form textarea[name="description"] { min-height: 120px; }

#post-file-form input[type="submit"] {
    background: var(--text-primary);
    color: var(--bg-secondary);
    border: 1px solid var(--text-primary);
    border-radius: var(--radius-button);
    padding: 0 var(--sp-6);
    min-height: 48px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
}

#post-file-form input[type="submit"]:hover:not(:disabled) {
    opacity: .88;
    transform: none;
    box-shadow: none;
}

/* 토글: 입체 스위치 → 평면 트랙 */
.toggle-switch {
    background: var(--border-strong);
    border-radius: 999px;
    box-shadow: none;
}

.toggle-switch:hover { transform: none; box-shadow: none; }

.toggle-slider {
    background: var(--bg-secondary);
    border: none;
    box-shadow: var(--shadow-resting);
}

.toggle-switch.active { background: var(--accent); box-shadow: none; }

.toggle-switch.active .toggle-slider {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-resting);
}

.toggle-label { font-weight: 500; color: var(--text-primary); }
.toggle-description { font-size: 13px; color: var(--text-secondary); }

/* 미리보기 타일 */
#image_tray_preview { gap: var(--sp-2); }

.preview-item {
    border-radius: var(--radius-image);
    background: var(--surface-sunken);
    border: 1px solid transparent;
}

.preview-item:hover {
    transform: none;
    box-shadow: var(--shadow-raised);
    border-color: var(--border-strong);
}

.preview-item.selected {
    border-color: var(--accent);
    box-shadow: none;
}

.preview-item-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent);
}

.preview-item-delete,
.preview-item-edit {
    border-radius: var(--radius-button);
    border: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}

.preview-item-delete { background: rgba(20, 20, 15, .72); }
.preview-item-edit { background: rgba(20, 20, 15, .72); }

.preview-item-delete:hover,
.preview-item-edit:hover {
    background: rgba(20, 20, 15, .9);
    transform: none;
    box-shadow: none;
}

.preview-item-status {
    background: rgba(20, 20, 15, .72);
    border-radius: var(--radius-button);
}

/* 배지 */
.ai-badge,
.edited-badge {
    background: var(--accent-wash);
    color: var(--accent-hover);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pen-type-btn.active {
    background: var(--text-primary) !important;
    color: var(--bg-secondary) !important;
    border-color: var(--text-primary) !important;
    box-shadow: none;
}

.pen-type-btn:hover:not(.active) {
    border-color: var(--border-strong);
    background: var(--surface-sunken);
}

/* 로그인 안내 카드 */
#auth-section > div {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-resting) !important;
}

#auth-section h2 { color: var(--text-primary); font-size: 18px; font-weight: 600; }

#auth-section button {
    background: var(--text-primary) !important;
    color: var(--bg-secondary) !important;
    border-radius: var(--radius-button) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    min-height: 44px;
}

/* 공개/비공개 아이콘: 이모지를 라인 아이콘 SVG 로 바꿨다. */
.privacy-icon { color: var(--text-secondary); }
.privacy-icon svg { width: 18px; height: 18px; display: block; }

.privacy-icon-field {
    background: var(--surface-sunken);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-button);
}

.privacy-label { font-weight: 500; color: var(--text-primary); }
.privacy-description { font-size: 13px; color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════════════════════
   sign_up.html
   ══════════════════════════════════════════════════════════════════════════ */

.signup-container {
    background: var(--bg-card);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-resting);
    animation: none;
}

.signup-header { margin-bottom: var(--sp-8); }

/* 라벨 앞 이모지 자리는 비웠다. 남은 빈 span 이 간격을 벌리지 않게. */
.input-icon:empty,
.terms-icon:empty { display: none; }

.success-message {
    background: var(--surface-sunken);
    border: 1px solid var(--border-color);
    border-left: 2px solid var(--success-color);
    border-radius: var(--radius-button);
    color: var(--text-secondary);
}

.success-message strong { color: var(--text-primary); }

.terms-section {
    background: none;
    border: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
}

.terms-list li { color: var(--text-secondary); font-size: 13px; }

.strength-bar { background: var(--surface-sunken); border-radius: 999px; }
.strength-fill { border-radius: 999px; }
.strength-text { color: var(--text-secondary); font-size: 12px; }

.validation-icon { color: var(--success-color); }

/* ══════════════════════════════════════════════════════════════════════════
   404.html
   ══════════════════════════════════════════════════════════════════════════ */

.error-container,
.error-code,
.error-title { text-shadow: none; }

.error-code {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    color: var(--text-light);
}

/* admin/backfill.html 은 토큰만 물려받으면 충분하다. 별도 규칙 없음. */

/* 404 카드/버튼 */
.error-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-resting);
    text-align: left;
    padding: var(--sp-12) var(--sp-8);
}

.error-title { color: var(--text-light); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }
.error-message { color: var(--text-secondary); font-size: 15px; }

.home-button {
    background: var(--text-primary);
    color: var(--bg-secondary);
    border: 1px solid var(--text-primary);
    border-radius: var(--radius-button);
    padding: 12px var(--sp-6);
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
    min-height: 44px;
}

.home-button:hover { transform: none; box-shadow: none; opacity: .88; }

.suggestion-links h3 {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.suggestion-links a { color: var(--text-secondary); }
.suggestion-links a:hover { color: var(--text-primary); }

/* ══════════════════════════════════════════════════════════════════════════
   모바일 (≤768px)
   기존 index 의 모바일 규칙은 한 화면에 욱여넣으려고 사진(.image-section)과
   기능 목록(.features), 제목까지 숨기고 body 에 max-height:100vh + overflow:hidden
   을 걸어 스크롤마저 막았다. 결과는 버튼 두 개만 뜬 빈 화면이다.
   사진이 주인공인 앱에서 사진을 숨기는 건 틀렸다. 세로로 흐르게 되돌린다.
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    body {
        display: block;
        max-height: none;
        height: auto;
        overflow-y: auto;
        padding: var(--sp-4);
        background: var(--bg-primary);
    }

    .login-container,
    .signup-container {
        max-height: none;
        overflow: visible;
        border-radius: var(--radius-card);
        background: var(--bg-card);
        box-shadow: var(--shadow-resting);
        border: 1px solid var(--border-color);
        margin: 0 auto;
    }

    /* 숨겨져 있던 것들을 되돌린다 */
    .image-section { display: flex; }
    .features { display: block; }
    .welcome-text h1 { display: block; }

    .image-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: var(--sp-6);
        border-radius: var(--radius-card) var(--radius-card) 0 0;
    }

    /* index 의 모바일 블록에 `* { max-width: 100% !important }` 가 있어
       !important 없이는 사진 크기를 제한할 수 없다. */
    .main-image { max-width: min(240px, 100%) !important; width: 100%; }
    .image-title { font-size: 17px; margin-top: var(--sp-4); }
    .image-subtitle { font-size: 13px; }

    .welcome-text { text-align: left; margin-bottom: var(--sp-6); }
    .welcome-text h1 { font-size: 20px; }
    .welcome-text p { font-size: 13px; }

    .form-section {
        padding: var(--sp-6) var(--sp-4);
        background: var(--bg-card);
        display: block;
        border-radius: 0 0 var(--radius-card) var(--radius-card);
    }

    /* 모바일 블록이 다시 칠해 놓은 보라색 버튼을 되돌린다. */
    .btn,
    .btn-primary,
    .btn-secondary {
        box-shadow: none;
        border-radius: var(--radius-button);
        font-size: 15px;
        font-weight: 500;
        letter-spacing: 0;
        min-height: 48px;
    }

    .btn-primary {
        background: var(--text-primary);
        color: var(--bg-secondary);
        border: 1px solid var(--text-primary);
    }

    .btn-secondary {
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .btn:hover,
    .btn:active,
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
        box-shadow: none;
    }

    .btn-secondary:hover { background: var(--surface-sunken); color: var(--text-primary); }

    body > .container { padding-top: 64px; }
    #post-file-form { padding: var(--sp-4); border-radius: var(--radius-card); }
    .error-content { padding: var(--sp-8) var(--sp-4); }
}

@media (max-width: 480px) {
    .login-container,
    .signup-container { max-height: none; border-radius: var(--radius-card); }
    .form-section { padding: var(--sp-4); }
}

/* 파일을 고르기 전 빈 미리보기 트레이가 회색 띠로 남지 않게 한다. */
#image_tray_preview:empty { display: none; }
#ai-result:empty { display: none; }
