@font-face {
    font-family: 'GowunBatang-Regular';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/GowunBatang-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --default-font: 'GowunBatang-Regular', serif;
    /* 테마 변수는 todo.js의 THEMES에서 덮어씁니다 */
    --bg: #D7ECD9;
    --surface: #F6FBF6;
    --text: #1E2A22;
    --sub: #5B6F61;
    --accent: #5CC98F;
    --accent-text: #10291C;
    --line: #0000001f;
    --overlay: #00000026;
    --radius: .75rem;
    --topbar-h: 3.5rem;
    --nav-h: 0rem; /* 아래 탭이 없음 */
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--default-font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--bg);
    -webkit-tap-highlight-color: transparent;
    transition: background-color .3s;
}
body.no-scroll { overflow: hidden; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
}
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hide { display: none !important; }

/* y접힘 / x접힘 (파티노트와 동일) */
.collapse-y {
    max-height: 0 !important;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
}
.collapse-x {
    max-width: 0 !important;
    overflow: hidden;
}

.scroll::-webkit-scrollbar { width: 6px; height: 0; }
.scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 1rem; }
.scroll:hover::-webkit-scrollbar-thumb { background: var(--overlay); }

/* ---------- 탑바 ---------- */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: calc(var(--topbar-h) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) .5rem 0 .75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg);
    box-shadow: inset 0 -100px 0 var(--overlay);
}
.logo-cover {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.35rem;
    font-weight: bold;
    min-width: 0;
}
.logo-img { width: 1.6rem; height: 1.6rem; border-radius: .35rem; }
.logo-text { white-space: nowrap; }
.right-position { display: flex; align-items: center; }

.top-bar-btn {
    position: relative;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.top-bar-btn:hover, .top-bar-btn.active { background-color: #0000002b; }
.top-bar-btn .badge {
    position: absolute;
    top: .3rem;
    right: .25rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 .25rem;
    border-radius: 1rem;
    background: var(--accent);
    color: var(--accent-text);
    font-size: .65rem;
    font-weight: bold;
    line-height: 1.05rem;
    font-family: system-ui, sans-serif;
}
.top-bar-btn .badge:empty { display: none; }

/* ---------- 버튼 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .55rem 1rem;
    border-radius: .5rem;
    border: 1px solid var(--text);
    background: transparent;
    font-weight: bold;
    font-size: .9rem;
}
.btn:hover { filter: brightness(.92); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.danger { background: #E53935; color: #fff; border-color: transparent; }
.btn.danger-ghost { color: #E53935; border-color: #E53935; }
.btn.ghost { background: var(--surface); border-color: var(--line); }

.icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.icon-btn:hover { background: var(--overlay); }
.icon-btn.solid { background: var(--accent); color: var(--accent-text); }

/* ---------- 팝업 ---------- */
.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: #00000055;
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.popup {
    width: 100%;
    max-width: 720px;
    height: 100%;
    max-height: 60rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 1px 1px 12px #0000006e;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pop-in .2s ease;
}
@keyframes pop-in {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: none; opacity: 1; }
}
.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .5rem .5rem 1rem;
    min-height: 3.25rem;
    border-bottom: 1px solid var(--line);
}
.popup-header .title {
    font-size: 1.15rem;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.popup-header .actions { display: flex; }
.popup-header .fa-star.fas { color: #F9A825; }
.popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    overscroll-behavior: contain;
}

/* ---------- 메뉴 드로어 ---------- */
.menu-overlay {
    position: fixed;
    top: calc(var(--topbar-h) + env(safe-area-inset-top));
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: 30;
    display: flex;
    justify-content: flex-end;
    overflow: hidden;
    transition: visibility 0s;
}
/* 어두운 배경만 따로 서서히 (메뉴 판은 비치지 않게 항상 불투명) */
.menu-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #00000040;
    transition: opacity .28s ease;
}
/* 닫힌 상태: 공용 .collapse-x(max-width: 0)를 쓰지 않고, 다 빠져나간 뒤에 숨김 */
.menu-overlay.collapse-x {
    max-width: 100vw !important;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s .28s;
}
.menu-overlay.collapse-x::before { opacity: 0; }
.menu-screen {
    position: relative; /* 어두운 배경(::before) 위에 */
    width: min(22rem, 100vw);
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
    padding: 1rem 1.1rem 2rem;
    background: var(--bg);
    box-shadow: -2px 0 10px var(--overlay);
    /* 오른쪽에서 미끄러져 들어오고, 같은 길로 나감 */
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}
.menu-overlay.collapse-x .menu-screen { transform: translateX(100%); }
/* 기기의 '동작 줄이기' 설정과 상관없이 움직입니다. (사용자가 원한 효과인데 그 설정 때문에 꺼져 보였음)
   메뉴·선택창 모두 같은 방침 */
.menu-screen h3 { margin: 1.75rem 0 .25rem; }
.menu-screen h3:first-child { margin-top: 0; }
.config-caption { font-size: .85rem; color: var(--sub); margin-bottom: .5rem; }
.radio-group { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.radio-group label { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
.radio-group input { accent-color: var(--accent); }
.menu-btn-group { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }

/* ---------- 토스트 / 다이얼로그 ---------- */
.toast-zone {
    position: fixed;
    left: 50%;
    bottom: calc(var(--nav-h) + 1rem + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    pointer-events: none;
}
.toast {
    padding: .6rem 1.1rem;
    border-radius: 2rem;
    background: var(--text);
    color: var(--surface);
    font-size: .9rem;
    box-shadow: 0 2px 10px #0004;
    animation: pop-in .2s ease;
    transition: opacity .4s;
    white-space: nowrap;
}
.toast.out { opacity: 0; }

.dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: #00000066;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.dialog {
    width: min(22rem, 100%);
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 4px 20px #0005;
    animation: pop-in .15s ease;
}
.dialog-message { white-space: pre-line; margin-bottom: 1.25rem; }
.dialog-btns { display: flex; justify-content: flex-end; gap: .5rem; }

/* ---------- 전체 삭제 (메뉴 맨 아래) ---------- */
.danger-zone {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px dashed #E5393566;
}
.danger-zone h3 { margin-top: 0; color: #E53935; }
.dialog-typed {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin: -.5rem 0 1.25rem;
    font-size: .88rem;
}
.dialog-typed b { color: #E53935; }
.dialog-typed input {
    padding: .55rem .65rem;
    border: 1px solid var(--line);
    border-radius: .5rem;
    background: var(--bg);
    outline: none;
}
.dialog-typed input:focus { border-color: #E53935; }
.btn:disabled { opacity: .35; cursor: not-allowed; filter: none; }

/* 메모 속 외부 링크 */
.ext-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
    word-break: break-all;
}
.ext-link::after {
    content: '\f35d'; /* fa-external-link-alt */
    display: inline-block; /* 밑줄이 아이콘까지 이어지지 않게 */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: .7em;
    margin-left: .3em;
    opacity: .6;
}
.dialog-message { overflow-wrap: anywhere; }

/* ---------- 아래에서 올라오는 선택창 ---------- */
.sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 65;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.sheet-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #00000055;
    opacity: 0;
    transition: opacity .25s ease;
}
.sheet-overlay.open::before { opacity: 1; }
.sheet {
    position: relative;
    width: 100%;
    max-width: 30rem;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    padding: .5rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    border-radius: 1.1rem 1.1rem 0 0;
    background: var(--surface);
    box-shadow: 0 -4px 20px #0003;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}
.sheet-overlay.open .sheet { transform: none; }
.sheet-handle { width: 2.5rem; height: .28rem; margin: 0 auto .6rem; border-radius: 1rem; background: var(--line); }
.sheet-title { font-weight: bold; margin-bottom: .75rem; }
.sheet-content { overflow-y: auto; }
.sheet-clear { display: block; margin: 1rem auto 0; }
/* ---------- 앱으로 설치 안내 ---------- */
.install-section .btn { margin-top: .25rem; }
.install-section .fa-check-circle { color: #43A047; }
/* 화면 아래 안내 한 줄 (화면 맨 아래) */
.install-banner {
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: calc(var(--nav-h) + .6rem + env(safe-area-inset-bottom));
    z-index: 27;
    display: flex;
    align-items: center;
    gap: .6rem;
    max-width: 30rem;
    margin: 0 auto;
    padding: .55rem .4rem .55rem .7rem;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line), 0 4px 16px #00000033;
    animation: install-banner-in .35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes install-banner-in {
    from { transform: translateY(1.5rem); opacity: 0; }
    to { transform: none; opacity: 1; }
}
.install-banner-icon { width: 1.75rem; height: 1.75rem; border-radius: .4rem; flex-shrink: 0; }
.install-banner-text { flex: 1; min-width: 0; font-size: .85rem; line-height: 1.35; }
.install-banner .btn { padding: .4rem .75rem; font-size: .82rem; white-space: nowrap; flex-shrink: 0; }
/* 안내가 떠 있는 동안 알림은 그 위로 */
body.has-install-banner .toast-zone { bottom: calc(var(--nav-h) + 5rem + env(safe-area-inset-bottom)); }

.install-steps { margin: 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: .7rem; line-height: 1.6; }
.install-steps i, .share-icon { color: var(--accent); }
.share-icon { width: 1.25em; height: 1.25em; vertical-align: -.25em; }
.install-note { margin: 1rem 0 0; padding: .6rem .8rem; border-radius: .5rem; background: var(--bg); font-size: .82rem; }
.install-guide-btns { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.1rem; }

/* ---------- 공용 작은 것들 ---------- */
.text-btn {
    border: 0;
    background: transparent;
    padding: .25rem .4rem;
    font-size: .85rem;
    color: var(--sub);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.dialog-btns.wrap { flex-wrap: wrap; }
.dialog-btns.stack { flex-direction: column; align-items: stretch; }
.dialog-typed input { width: 100%; }
.dialog-typed input:focus { border-color: var(--accent); }
.empty-state {
    text-align: center;
    color: var(--sub);
    padding: 3.5rem 1rem;
}
.empty-state > i { font-size: 2.5rem; opacity: .5; }
.empty-state p { margin: .75rem 0 1.25rem; }
.empty-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; }

@media (max-width: 768px) {
    .popup-overlay { padding: 0; }
    .popup {
        max-width: none;
        max-height: none;
        border-radius: 0;
        padding-top: env(safe-area-inset-top);
    }
}

/* ---------- 검색 ---------- */
.search-banner {
    position: sticky;
    top: calc(var(--topbar-h) + env(safe-area-inset-top));
    z-index: 15;
    max-height: 5rem;
    background-color: var(--bg);
    box-shadow: inset 0 -100px 0 #00000014;
    transition: max-height .35s ease;
}
.search-inner {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .5rem .75rem;
    padding: 0 .25rem 0 .75rem;
    border: 1px solid var(--text);
    border-radius: 2rem;
    background: var(--surface);
}
.search-inner > i { color: var(--sub); font-size: .9rem; }
#item-searcher {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: .55rem 0;
    background: transparent;
    outline: none;
}
#item-searcher::-webkit-search-cancel-button { display: none; }
.search-deleter {
    border: 0;
    background: transparent;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

/* ---------- 목록 ---------- */
.main {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 .75rem calc(2rem + env(safe-area-inset-bottom));
}
/* 스크롤해도 위쪽 바(검색창이 열려 있으면 그 아래)에 붙어 있음 */
.type-tabs {
    position: sticky;
    top: calc(var(--topbar-h) + env(safe-area-inset-top) + var(--search-h, 0px));
    z-index: 10;
    display: flex;
    gap: .4rem;
    margin: 0 -.75rem;
    padding: .65rem .75rem;
    background: var(--bg);
}
.type-tabs button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .8rem;
    border: 1px solid var(--line);
    border-radius: 2rem;
    background: var(--surface);
    font-size: .9rem;
    white-space: nowrap;
}
.type-tabs button[aria-selected="true"] {
    background: var(--accent);
    color: var(--accent-text);
    border-color: transparent;
    font-weight: bold;
}
.type-tabs .count { font-family: system-ui, sans-serif; font-size: .75rem; opacity: .7; }

.item-list { display: flex; flex-direction: column; gap: .5rem; }
.item-row {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem .75rem .85rem .9rem;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line);
    cursor: pointer;
}
.item-row:hover { filter: brightness(.97); }
.item-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}
.item-row.project .item-icon { background: var(--accent); color: var(--accent-text); }
.item-body { flex: 1; min-width: 0; }
.item-title { font-weight: bold; overflow-wrap: anywhere; }
.item-sub { font-size: .82rem; color: var(--sub); }
.item-sub.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-arrow { flex-shrink: 0; font-size: .75rem; opacity: .35; }
.progress {
    height: .3rem;
    margin-top: .4rem;
    border-radius: 1rem;
    background: var(--overlay);
    overflow: hidden;
}
.progress span { display: block; height: 100%; border-radius: 1rem; background: var(--accent); transition: width .25s; }

/* ---------- 프로젝트 상세 ---------- */
.popup-header .title i { margin-right: .25rem; opacity: .7; }
.project-detail { display: flex; flex-direction: column; gap: 1.5rem; }
.todo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.25rem;
    border-bottom: 2px solid var(--text);
}
.todo-head h4 { margin: 0; font-size: 1.05rem; }
.todo-count { font-family: system-ui, sans-serif; font-size: .8rem; color: var(--sub); }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo { display: flex; align-items: center; border-bottom: 1px dashed var(--line); }
.todo-item {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .7rem .25rem;
    border: 0;
    background: transparent;
    text-align: left;
}
.check {
    flex-shrink: 0;
    width: 1.3rem;
    height: 1.3rem;
    margin-top: .1rem;
    border: 1.5px solid var(--sub);
    border-radius: .35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: transparent;
}
.todo-text { overflow-wrap: anywhere; font-size: 1.02rem; }
.todo.done .check { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.todo.done .todo-text { text-decoration: line-through; opacity: .45; }
.todo .icon-btn { opacity: .5; font-size: .85rem; }
.todo-empty { margin: 0; padding: 1.1rem .25rem; color: var(--sub); }

.todo-finish {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
    padding: .65rem .8rem;
    border-radius: var(--radius);
    background: var(--bg);
    font-weight: bold;
    animation: pop-in .25s ease;
}
.todo-add { display: flex; align-items: center; gap: .5rem; margin-top: .75rem; }
.todo-input {
    flex: 1;
    min-width: 0;
    padding: .55rem .75rem;
    border: 1px solid var(--line);
    border-radius: .6rem;
    background: var(--bg);
    outline: none;
}
.todo-input:focus { border-color: var(--accent); }
.show-next { align-self: flex-start; margin-top: -.75rem; }

/* 지난 히스토리: 할 일 칸들과 굵은 선으로 구분 */
.history {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-top: 1.5rem;
    border-top: 3px double var(--line);
}
.history-clear { align-self: flex-end; margin: -.9rem 0 -.75rem; }
.todo-section.past .todo-head { border-bottom-width: 1px; border-color: var(--line); }
.todo-section.past .todo-head h4 { font-size: .92rem; color: var(--sub); }
.todo-section.past .todo-item { padding: .5rem .25rem; }

/* 선택창의 세로 선택지 */
.sheet-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-options { display: flex; flex-direction: column; gap: .4rem; }
.sheet-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 0;
    border-radius: .75rem;
    background: var(--bg);
    text-align: left;
    font-size: 1rem;
}
.sheet-option i { width: 1.2rem; text-align: center; opacity: .75; }
.sheet-option.danger { color: #E53935; }

/* ---------- 메모 ---------- */
.memo-title { margin: 0 0 .75rem; font-size: 1.3rem; overflow-wrap: anywhere; }
.memo-content { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.memo-date { margin-top: 1.5rem; font-size: .78rem; color: var(--sub); text-align: right; }
.memo-editor { display: flex; flex-direction: column; gap: .6rem; }
.memo-title-input, .memo-content-input {
    width: 100%;
    padding: .6rem .7rem;
    border: 1px solid var(--line);
    border-radius: .5rem;
    background: transparent;
    outline: none;
}
.memo-title-input { font-weight: bold; font-size: 1.1rem; }
.memo-content-input { line-height: 1.7; resize: none; overflow: hidden; }
.memo-title-input:focus, .memo-content-input:focus { border-color: var(--accent); }
.editor-btns { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .4rem; }

/* 프로젝트 정보 (선택창 안) */
.info-list { margin: 0; display: flex; flex-direction: column; }
.info-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem .1rem;
    border-bottom: 1px dashed var(--line);
}
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--sub); font-size: .9rem; }
.info-list dt i { width: 1.2rem; text-align: center; opacity: .75; }
.info-list dd { margin: 0; font-weight: bold; text-align: right; white-space: nowrap; }

/* ---------- 프로젝트 완료 / 중단 ---------- */
/* 완료: 테마와 상관없이 환한 금빛 */
.item-row.project[data-status="done"] {
    background: linear-gradient(135deg, #FFFDE7, #FFE082);
    color: #3E2F00;
    box-shadow: 0 0 0 1px #FFC10799, 0 2px 10px #FFC10744;
}
.item-row.project[data-status="done"] .item-icon { background: #FFB300; color: #3E2F00; }
.item-row.project[data-status="done"] .item-sub { color: #7A5F00; }
/* 중단: 조금 어둡게, 꺼진 것처럼 */
.item-row.project[data-status="stopped"] {
    background: var(--overlay);
    box-shadow: 0 0 0 1px var(--line);
    opacity: .6;
    filter: grayscale(1);
}
.item-row.project[data-status="stopped"] .item-icon { background: var(--sub); color: var(--surface); }
.item-row.project[data-status="stopped"] .item-title { text-decoration: line-through; text-decoration-color: var(--sub); }

.status-banner {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem .9rem;
    border-radius: var(--radius);
    font-weight: bold;
}
[data-status="done"] > .status-banner { background: linear-gradient(135deg, #FFFDE7, #FFE082); color: #3E2F00; box-shadow: 0 0 0 1px #FFC10799; }
[data-status="stopped"] > .status-banner { background: var(--overlay); color: var(--sub); }
/* 중단한 프로젝트는 안쪽도 한 톤 가라앉힘 (고치는 것은 그대로 가능) */
[data-status="stopped"] > .todo-section, [data-status="stopped"] > .history { opacity: .6; filter: grayscale(1); }

.status-actions { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.status-btn {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: .75rem 1rem;
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: var(--bg);
    text-align: left;
}
.status-btn b i { width: 1.2rem; text-align: center; }
.status-btn span { font-size: .8rem; color: var(--sub); padding-left: 1.5rem; }
.status-btn.done { background: linear-gradient(135deg, #FFFDE7, #FFE082); border-color: #FFC10799; color: #3E2F00; }
.status-btn.done span { color: #7A5F00; }
.status-btn.stopped { background: transparent; color: var(--sub); }

.confetti-layer {
    position: fixed;
    left: 50%;
    top: 40%;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 80;
}
.confetti {
    position: absolute;
    width: .55rem;
    height: .8rem;
    border-radius: 2px;
    opacity: 0;
    animation: confetti-fly var(--d) cubic-bezier(.15, .7, .3, 1) forwards;
}
@keyframes confetti-fly {
    0% { transform: translate(0, 0) rotate(0) scale(.4); opacity: 1; }
    75% { opacity: 1; }
    100% { transform: translate(var(--x), calc(var(--y) + 140px)) rotate(var(--r)) scale(1); opacity: 0; }
}

/* ---------- 즐겨찾기 ---------- */
.fav-btn .fas.fa-star, .item-fav, .type-tabs .fa-star { color: #F9A825; }
.type-tabs button[aria-selected="true"] .fa-star { color: inherit; }
.item-fav { flex-shrink: 0; font-size: .85rem; }
/* 탭이 네 개라 좁은 화면에서 넘치면 옆으로 밀어서 봄 */
.type-tabs { overflow-x: auto; scrollbar-width: none; }
.type-tabs::-webkit-scrollbar { display: none; }
.type-tabs button { flex-shrink: 0; }
@media (max-width: 400px) {
    .popup-header .icon-btn { width: 2.05rem; }
}

/* ---------- 후원하기 (메뉴) ---------- */
/* 바깥 스크립트(위젯)를 쓰지 않고 Ko-fi 페이지로 가는 링크만 둡니다. */
.support-btn { background: #72A4F2; color: #fff; border-color: transparent; text-decoration: none; }
/* Ko-fi 공식 심볼 (img/kofi_symbol.png, Ko-fi 브랜드 자료에서 받은 것) */
.support-icon { height: 1.35em; width: auto; }

/* ---------- 아이폰: 입력칸을 눌러도 화면이 확대되지 않게 ---------- */
/* 아이폰(Safari)은 글자가 16px보다 작은 입력칸에 커서를 두면 화면을 확대합니다.
   아이폰에서만 입력칸 글자를 16px로 맞춰 확대를 막습니다. (다른 기기는 그대로) */
@supports (-webkit-touch-callout: none) {
    input:not([type="radio"]):not([type="checkbox"]):not([type="file"]), textarea, select { font-size: 16px !important; }
    .memo-title-input { font-size: 1.1rem !important; }
}
