/* ═══════════════════════════════════════════
   TypeCheck – 全スタイル（改善版）
   ══════��════════════════════════════════════ */

/* ─── CSS 変数 ─── */
:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --like: #e84393;
    --dislike: #636e72;
    --good: #e17055;
    --bad: #d63031;
    --yes-bg: #d4edda;
    --yes-text: #155724;
    --no-bg: #f8d7da;
    --no-text: #721c24;

    --bg: #f4f5f7;
    --card: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --border: #dfe6e9;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .1);

    --radius: 10px;
    --sidebar-w: 240px;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

/* ═══ AUTH PAGES（PC最適化） ═══ */
body.auth-page {
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    display: flex;
    max-width: 1100px;
    width: 100%;
    margin: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    background: var(--card);
}

/* 左：グラデーション */
.auth-visual {
    flex: 1;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #fff;
    min-height: 400px;
}

.visual-content {
    text-align: center;
    max-width: 360px;
}

.auth-icon {
    font-size: 3.8rem;
    display: block;
    margin-bottom: .6rem;
}

.auth-visual h1 {
    font-size: 2.2rem;
    margin-bottom: .6rem;
}

.auth-visual p {
    font-size: 1rem;
    line-height: 1.65;
    opacity: .88;
}

/* 右：フォーム */
.auth-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    min-width: 380px;
    background: var(--card);
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-header {
    margin-bottom: 1.5rem;
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: .3rem;
}

.auth-header p {
    color: var(--text-light);
    font-size: .95rem;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .4rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .material-icons-round {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.2rem;
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    padding: .75rem .85rem .75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: var(--card);
    transition: border-color .2s, box-shadow .2s;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .1);
}

.badge {
    display: inline-block;
    font-size: .72rem;
    background: var(--primary);
    color: #fff;
    padding: .15rem .4rem;
    border-radius: 4px;
    margin-left: .3rem;
}

.auth-btn {
    display: block;
    width: 100%;
    padding: .85rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1.6rem;
    transition: background .2s, transform .1s, box-shadow .2s;
}

.auth-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, .3);
}

.auth-btn:active {
    transform: scale(.98);
}

.auth-footer {
    text-align: center;
    margin-top: 1.4rem;
    font-size: .9rem;
    color: var(--text-light);
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

.err-box {
    background: #f8d7da;
    color: #721c24;
    padding: .65rem .85rem;
    border-radius: 8px;
    font-size: .88rem;
    margin-bottom: .85rem;
    border-left: 4px solid #d63031;
}

.err-box.hidden {
    display: none;
}

/* ─── Auth responsive ─── */
@media (max-width: 900px) {
    .auth-container {
        flex-direction: column;
        margin: 1rem;
    }

    .auth-visual {
        min-height: auto;
        padding: 2.5rem 1.5rem;
    }

    .auth-form-wrapper {
        min-width: unset;
        padding: 2rem 1.5rem;
    }
}

/* ═══ APP LAYOUT ═══ */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ─── Sidebar ─── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 200;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1.4rem 1.2rem;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    color: var(--primary);
    font-size: 1.7rem;
}

.logo-area h2 {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
}

.tagline {
    font-size: .78rem;
    color: var(--text-light);
}

.nav-links {
    flex: 1;
    padding: .7rem .6rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .62rem .85rem;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: .92rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .18s, color .18s;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: #f0eeff;
    color: var(--primary);
}

.nav-item.active {
    background: #ede9fe;
    color: var(--primary);
    font-weight: 700;
}

.nav-item .material-icons-round {
    font-size: 1.22rem;
    flex-shrink: 0;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .9rem 1.2rem;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    text-decoration: none;
    font-size: .88rem;
    transition: color .2s;
}

.logout-link:hover {
    color: var(--primary);
}

/* ─── Mobile header ─── */
.mobile-header {
    display: none;
    align-items: center;
    height: 52px;
    padding: 0 .85rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    gap: .5rem;
}

.mobile-title {
    flex: 1;
    font-weight: 700;
    font-size: 1rem;
}

/* ─── Main ─── */
.main-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* ─── View sections ─── */
.view-section {
    display: block;
}

.view-section.hidden {
    display: none;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.6rem 1.5rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.3rem;
}

.page-header h1 {
    font-size: 1.5rem;
}

/* ─── Buttons (shared) ─── */
.primary-btn,
.secondary-btn,
.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1.1rem;
    border-radius: 8px;
    border: none;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s, transform .1s, box-shadow .2s;
    white-space: nowrap;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, .3);
}

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

.secondary-btn:hover {
    background: #e8e8e8;
}

.submit-btn {
    background: var(--primary);
    color: #fff;
    width: 100%;
    justify-content: center;
    padding: .75rem;
    margin-top: .8rem;
    font-size: 1rem;
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, .3);
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: background .18s, color .18s;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: #f0eeff;
    color: var(--primary);
}

/* ═══ CATEGORY BLOCKS (記録画面) ═══ */
.cat-block {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem 1.3rem;
    margin-bottom: 1rem;
    transition: box-shadow .2s;
}

.cat-block:hover {
    box-shadow: var(--shadow-md);
}

.cat-block-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .7rem;
}

.cat-block-head h3 {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 700;
}

/* カテゴリアイコン色 */
.cat-ico.like {
    color: var(--like);
    font-size: 1.3rem;
}

.cat-ico.dislike {
    color: var(--dislike);
    font-size: 1.3rem;
}

.cat-ico.good {
    color: var(--good);
    font-size: 1.3rem;
}

.cat-ico.bad {
    color: var(--bad);
    font-size: 1.3rem;
}

/* 項目行 */
.cat-item-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.item-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem .8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
    user-select: none;
}

.item-row:hover {
    border-color: var(--primary);
    background: #f7f6ff;
    transform: translateY(-1px);
}

.item-row .item-label {
    flex: 1;
    font-size: .98rem;
}

.item-row .item-counts {
    font-size: .8rem;
    color: var(--text-light);
    white-space: nowrap;
}

.item-row .item-badge {
    font-size: .76rem;
    font-weight: 700;
    padding: .16rem .45rem;
    border-radius: 20px;
    white-space: nowrap;
}

.item-row .item-badge.yes {
    background: var(--yes-bg);
    color: var(--yes-text);
}

.item-row .item-badge.no {
    background: var(--no-bg);
    color: var(--no-text);
}

.item-row .item-badge.none {
    background: var(--bg);
    color: var(--text-light);
}

.empty-text {
    color: var(--text-light);
    font-size: .9rem;
    font-style: italic;
    padding: .5rem 0;
    text-align: center;
}

/* ═══ HISTORY ═══ */
.history-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    background: var(--card);
    border-radius: var(--radius);
    padding: .75rem .95rem;
    box-shadow: var(--shadow-sm);
}

.history-item .h-badge {
    font-size: .76rem;
    font-weight: 700;
    padding: .14rem .4rem;
    border-radius: 16px;
    flex-shrink: 0;
}

.history-item .h-badge.yes {
    background: var(--yes-bg);
    color: var(--yes-text);
}

.history-item .h-badge.no {
    background: var(--no-bg);
    color: var(--no-text);
}

.history-item .h-cat {
    font-size: .78rem;
    color: var(--text-light);
    flex-shrink: 0;
}

.history-item .h-label {
    flex: 1;
    font-size: .95rem;
}

.history-item .h-note {
    font-size: .82rem;
    color: var(--text-light);
    font-style: italic;
}

.history-item .h-time {
    font-size: .76rem;
    color: var(--text-light);
    flex-shrink: 0;
}

.history-item .btn-del {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.history-item .btn-del:hover {
    color: var(--bad);
}

/* ═══ STATS ═══ */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem;
}

.stat-card h4 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: .65rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.stat-card h4 .material-icons-round {
    font-size: 1.15rem;
}

.bar-wrap {
    margin-bottom: .4rem;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    color: var(--text-light);
    margin-bottom: .2rem;
}

.bar-bg {
    background: var(--bg);
    border-radius: 5px;
    height: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width .4s;
}

.bar-fill.yes {
    background: linear-gradient(90deg, #00b894, #55efc4);
}

.bar-fill.no {
    background: linear-gradient(90deg, #d63031, #e17055);
}

.stat-total {
    font-size: .8rem;
    color: var(--text-light);
    margin-top: .3rem;
}

.stat-item-list {
    margin-top: .65rem;
    max-height: 160px;
    overflow-y: auto;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
    padding: .22rem 0;
    border-bottom: 1px solid #f2f2f2;
}

.stat-item:last-child {
    border: none;
}

.stat-item .si-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: .4rem;
}

.stat-item .si-vals {
    color: var(--text-light);
    white-space: nowrap;
}

/* ═══ PATTERN ═══ */
.pattern-summary {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.4rem;
    margin-bottom: 1rem;
}

.pattern-summary h4 {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    opacity: .82;
    margin-bottom: .35rem;
}

.pattern-summary p {
    font-size: 1rem;
    line-height: 1.6;
}

.kw-row {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: 1rem;
}

.kw {
    font-size: .84rem;
    font-weight: 600;
    padding: .25rem .65rem;
    border-radius: 18px;
}

.kw.pos {
    background: var(--yes-bg);
    color: var(--yes-text);
}

.kw.neg {
    background: var(--no-bg);
    color: var(--no-text);
}

.pattern-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: .95rem 1.1rem;
    border-left: 4px solid var(--border);
    margin-bottom: .65rem;
}

.pattern-card.positive {
    border-left-color: #00b894;
}

.pattern-card.negative {
    border-left-color: #d63031;
}

.pattern-card.neutral {
    border-left-color: #fdcb6e;
}

.pattern-card h5 {
    font-size: .96rem;
    margin-bottom: .18rem;
}

.pattern-card p {
    font-size: .86rem;
    color: var(--text-light);
}

.advice-box {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-top: .7rem;
}

.advice-box h4 {
    font-size: .86rem;
    color: #f57f17;
    margin-bottom: .3rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.advice-box p {
    font-size: .9rem;
    color: #e65100;
    line-height: 1.55;
}

.pattern-placeholder {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ═══ MANAGE ═══ */
.manage-section {
    margin-bottom: 1.4rem;
}

.manage-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .55rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.manage-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.manage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card);
    border-radius: 8px;
    padding: .6rem .8rem;
    box-shadow: var(--shadow-sm);
    font-size: .95rem;
}

.manage-item span {
    flex: 1;
}

.manage-item .btn-del {
    color: var(--text-light);
}

.manage-item .btn-del:hover {
    color: var(--bad);
}

/* ═══ MODAL（拡大版） ═══ */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(4px);
    z-index: 400;
}

.overlay.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 1.5rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    /* ← 拡大 */
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: modalIn .2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-header h3 {
    font-size: 1.15rem;
}

.close-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: 0;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 8px;
    transition: background .2s, color .2s;
}

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

.modal-body {
    padding: 1.5rem;
}

/* 入力フォーム拡大 */
.modal-body .input-group label {
    font-size: .92rem;
    font-weight: 600;
    margin-bottom: .45rem;
}

.modal-body .input-group input,
.modal-body .input-group textarea {
    width: 100%;
    padding: .85rem 1rem;
    /* ← 拡大 */
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    /* ← 拡大 */
    font-family: inherit;
    background: var(--card);
    transition: border-color .2s, box-shadow .2s;
}

.modal-body .input-group input:focus,
.modal-body .input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .1);
}

/* Yes / No ボタン */
.yn-question {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .85rem;
    line-height: 1.4;
}

.yn-buttons {
    display: flex;
    gap: .85rem;
    margin-top: 1.2rem;
}

.btn-yes,
.btn-no {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .75rem;
    /* ← 拡大 */
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    /* ← 拡大 */
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s, transform .12s, box-shadow .2s;
}

.btn-yes {
    background: var(--yes-bg);
    color: var(--yes-text);
}

.btn-yes:hover {
    background: #00b894;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 184, 148, .35);
}

.btn-no {
    background: var(--no-bg);
    color: var(--no-text);
}

.btn-no:hover {
    background: #d63031;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(214, 48, 49, .35);
}

.btn-yes .material-icons-round,
.btn-no .material-icons-round {
    font-size: 1.25rem;
}

/* ═══ RESPONSIVE ═══ */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 720px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex;
    }

        .manage-section h3 {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.5rem;
        }
    
        .manage-section h3 .secondary-btn {
            margin-left: 0 !important;
            width: 100%;
            justify-content: center;
        }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, .18);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        padding-top: 52px;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--card);
        border-top: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-around;
        z-index: 100;
        padding: 0 .5rem;
    }

    .bottom-nav .nav-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .15rem;
        background: none;
        border: none;
        color: var(--text-light);
        font-size: .7rem;
        cursor: pointer;
        padding: .35rem .6rem;
        border-radius: 8px;
        transition: color .2s;
    }

    .bottom-nav .nav-icon .material-icons-round {
        font-size: 1.4rem;
    }

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

    .bottom-nav .nav-icon:hover {
        color: var(--primary);
    }

    .content-wrapper {
        padding-bottom: 80px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: 100%;
    }
}

/* Scrollbar（デスクトップ） */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b2bec3;
}

/* ... (既存のCSS) ... */

/* ═══ オンボーディング ═══ */
.onboarding-modal {
    max-width: 480px !important;
}

.onboarding-question {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    line-height: 1.5;
    color: var(--primary);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* ... (既存のCSS) ... */

/* カテゴリアイコン色 */
.cat-ico.love {
    color: #e74c3c;
    font-size: 1.3rem;
}

.cat-ico.like {
    color: var(--like);
    font-size: 1.3rem;
}

/* ... (残りは既存のまま) ... */

/* 詳細ボタン */
.item-detail-btn {
    opacity: 0.5;
    transition: opacity .2s;
}

.item-row:hover .item-detail-btn {
    opacity: 1;
}

/* ... (既存のCSS) ... */

/* カスタムカテゴリ */
.cat-ico.custom {
    color: #9b59b6;
    font-size: 1.3rem;
}

/* カテゴリ削除ボタン */
.cat-del-btn {
    opacity: 0.5;
    transition: opacity .2s, color .2s;
}

.cat-block-head:hover .cat-del-btn {
    opacity: 1;
}

.cat-del-btn:hover {
    color: var(--bad) !important;
}

/* selectのスタイル調整 */
#modal-cat-icon {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23636e72' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.5rem;
}