        .atm-app-container {
            display: flex;
            flex-direction: column;
            border: 1px solid #999;
            height: 70vh;
            min-height: 450px;
            max-height: 1200px;
            resize: vertical;
            overflow: hidden;
            background: #fff;
            margin: 2em 0;
            box-sizing: border-box;
            position: relative;
            user-select: none;
        }
        .atm-app-container input,
        .atm-app-container textarea {
            user-select: text;
        }

        .atm-app-container::after {
            content: '↘ サイズ変更';
            position: absolute;
            bottom: 2px;
            right: 8px;
            font-size: 10px;
            color: #aaa;
            pointer-events: none;
            user-select: none;
            z-index: 20;
        }

        .atm-top-bar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 5px 12px 5px 6px;
            background: #f0f0f0;
            border-bottom: 1px solid #999;
            z-index: 10;
        }

        .atm-search-box input {
            padding: 4px 8px;
            width: 250px;
            border: 1px solid #ccc;
            border-radius: 2px;
            font-size: 13px;
            outline: none;
            transition: border-color 0.2s ease;
        }

        .atm-search-box input:focus {
            border-color: #799fb9;
        }

        .atm-options {
            display: flex;
            gap: 6px;
            font-size: 11px;
            color: #444;
            flex-wrap: wrap;
        }

        .atm-pill-hidden {
            display: none !important;
        }

        .atm-pill {
            display: inline-flex;
            align-items: center;
            padding: 2px 8px;
            border: 1px solid #d0d0d0;
            border-radius: 4px;
            background: #fff;
            color: #888;
            font-size: 11px;
            cursor: pointer;
            user-select: none;
            transition: all 0.15s ease;
            line-height: 1.4;
            white-space: nowrap;
        }

        .atm-pill:hover {
            background: #f5f5f5;
            color: #555;
        }

        .atm-pill.atm-pill-active {
            background: #f0f0f0;
            border-color: #aaa;
            color: #333;
        }

        .atm-pill.atm-pill-active:hover {
            background: #e8e8e8;
        }

        /* ===== 歯車メニュー ===== */
        .atm-gear-wrap {
            position: relative;
            display: inline-flex;
        }
        .atm-gear-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 26px;
            border: 1px solid #d0d0d0;
            border-radius: 4px;
            background: #fff;
            color: #999;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .atm-gear-btn:hover { background: #f5f5f5; color: #666; }
        .atm-gear-btn.atm-gear-btn-open {
            background: #f0f0f0;
            border-color: #aaa;
            color: #555;
        }
        .atm-gear-btn svg {
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .atm-gear-btn.atm-gear-btn-open svg {
            transform: rotate(60deg);
        }
        .atm-gear-menu {
            position: absolute;
            top: calc(100% + 4px);
            right: 0;
            z-index: 100;
            min-width: 190px;
            padding: 6px 0;
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 6px;
            background: rgba(255,255,255,0.88);
            backdrop-filter: blur(16px) saturate(1.3);
            -webkit-backdrop-filter: blur(16px) saturate(1.3);
            box-shadow: 0 4px 16px rgba(0,0,0,0.1);
            display: none;
            animation: atmGearOpen 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .atm-gear-menu.atm-gear-menu-open {
            display: block;
        }
        @keyframes atmGearOpen {
            0% { opacity: 0; transform: translateY(-4px) scale(0.95); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }
        .atm-gear-item {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 5px 12px;
            font-size: 11px;
            color: #666;
            cursor: pointer;
            user-select: none;
            transition: background 0.12s ease;
            white-space: nowrap;
        }
        .atm-gear-item:hover { background: rgba(0,0,0,0.04); }
        .atm-gear-item input { display: none; }
        .atm-gear-check {
            width: 14px;
            height: 14px;
            border: 1.5px solid #ccc;
            border-radius: 3px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
            flex-shrink: 0;
        }
        .atm-gear-check::after {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 1.5px;
            background: transparent;
            transition: background 0.15s ease;
        }
        .atm-gear-item input:checked ~ .atm-gear-check {
            border-color: #888;
        }
        .atm-gear-item input:checked ~ .atm-gear-check::after {
            background: #666;
        }
        .atm-gear-sep {
            height: 1px;
            background: rgba(0,0,0,0.07);
            margin: 4px 8px;
        }
        .atm-gear-label {
            padding: 3px 12px 2px;
            font-size: 9px;
            color: #aaa;
            letter-spacing: 0.3px;
        }
        .atm-gear-segment {
            display: flex;
            margin: 2px 10px 4px;
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 5px;
            overflow: hidden;
            background: rgba(0,0,0,0.03);
        }
        .atm-gear-seg-btn {
            flex: 1;
            padding: 4px 0;
            border: none;
            background: transparent;
            font-size: 10px;
            color: #999;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }
        .atm-gear-seg-btn:not(:last-child)::after {
            content: '';
            position: absolute;
            right: 0;
            top: 20%;
            height: 60%;
            width: 1px;
            background: rgba(0,0,0,0.08);
        }
        .atm-gear-seg-btn:hover {
            background: rgba(0,0,0,0.04);
            color: #666;
        }
        .atm-gear-seg-btn.atm-gear-seg-active {
            background: #fff;
            color: #444;
            font-weight: 600;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }
        .atm-gear-seg-btn.atm-gear-seg-active::after {
            display: none;
        }

        /* ===== ソフト / シンプル 共通 ===== */
        .atm-mode-soft .atm-tag-block,
        .atm-mode-simple .atm-tag-block {
            border-left-width: 3px !important;
        }
        .atm-mode-soft .atm-tag-mythic,
        .atm-mode-simple .atm-tag-mythic {
            box-shadow: 1px 1px 0px rgba(0,0,0,0.08) !important;
        }
        /* シンプル：背景白、ボーダー色は維持 */
        .atm-mode-simple .atm-tag-block {
            background-color: #fff !important;
        }
        .atm-mode-simple .atm-related-item,
        .atm-mode-simple .atm-pb-ac-item {
            background: rgba(0,0,0,0.015) !important;
        }

        /* ===== カスタムドロップダウン ===== */
        .atm-dropdown {
            position: relative;
            display: inline-flex;
        }

        .atm-dropdown-trigger {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 8px;
            border: 1px solid #d0d0d0;
            border-radius: 4px;
            background: #fff;
            color: #888;
            font-size: 11px;
            cursor: pointer;
            user-select: none;
            transition: all 0.15s ease;
            line-height: 1.4;
            white-space: nowrap;
        }

        .atm-dropdown-trigger:hover {
            background: #f5f5f5;
            color: #555;
        }

        .atm-dropdown.atm-dropdown-open .atm-dropdown-trigger {
            background: #f0f0f0;
            border-color: #aaa;
            color: #333;
        }

        .atm-dropdown-arrow {
            font-size: 9px;
            transition: transform 0.2s ease;
            line-height: 1;
        }

        .atm-dropdown.atm-dropdown-open .atm-dropdown-arrow {
            transform: rotate(180deg);
        }

        .atm-dropdown-menu {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            min-width: 100%;
            background: #fff;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-4px);
            transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
            overflow: hidden;
        }

        .atm-dropdown.atm-dropdown-open .atm-dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .atm-dropdown-item {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 5px 10px 5px 8px;
            font-size: 11px;
            color: #666;
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.1s ease, color 0.1s ease;
            border-left: 2px solid transparent;
        }

        .atm-dropdown-item:hover {
            background: #f5f5f5;
            color: #333;
        }

        .atm-dropdown-item.atm-dropdown-item-active {
            color: #333;
            font-weight: 600;
            border-left-color: #555;
        }

        .atm-dropdown-item-check {
            display: none;
        }

        .atm-content-area {
            display: flex;
            flex-grow: 1;
            overflow: hidden;
        }

        .atm-sidebar {
            width: 220px;
            min-width: 220px;
            background: #f8f8f8;
            border-right: 1px solid #999;
            overflow-y: auto;
            padding: 0 0 5px 0;
        }

        .atm-compact-toggle-area {
            position: sticky;
            top: 0;
            z-index: 5;
            background: #f8f8f8;
            border-bottom: 1px solid #ddd;
            padding: 6px 10px;
        }

        .atm-compact-label {
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            user-select: none;
            font-size: 11px;
            color: #555;
            margin: 0;
        }

        .atm-compact-text {
            font-weight: 600;
            letter-spacing: 0.02em;
        }

        .atm-switch {
            position: relative;
            display: inline-block;
            width: 36px;
            height: 20px;
            flex-shrink: 0;
        }

        .atm-switch input {
            opacity: 0;
            width: 0;
            height: 0;
            position: absolute;
        }

        .atm-switch-slider {
            position: absolute;
            cursor: pointer;
            inset: 0;
            background: #ccc;
            border-radius: 20px;
            transition: background 0.25s ease;
        }

        .atm-switch-slider::before {
            content: '';
            position: absolute;
            height: 14px;
            width: 14px;
            left: 3px;
            bottom: 3px;
            background: #fff;
            border-radius: 50%;
            transition: transform 0.25s ease;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }

        .atm-switch input:checked + .atm-switch-slider {
            background: #4CAF50;
        }

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

        .atm-sidebar-loading, .atm-tags-loading {
            padding: 12px;
            color: #888;
            font-size: 12px;
        }

        .atm-tree-item {
            padding: 3px 12px;
            cursor: pointer;
            font-size: 12px;
            color: #333;
            border-bottom: 1px solid #e8e8e8;
            user-select: none;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
        }

        .atm-tree-item:hover {
            background: #e4ecf2;
        }

        .atm-tree-item.active {
            background: #2e8fd1;
            color: #fff;
            padding-left: 8px;
        }

        .atm-major-cat {
            font-weight: bold;
            background: #e0e0e0;
            font-size: 12px;
        }

        .atm-sub-cat {
            font-weight: bold;
            background: #eee;
            margin: 2px 0 2px 4px;
            border-radius: 4px 0 0 4px;
            border-bottom: none;
        }

        .atm-major-children {
            padding-left: 8px;
        }

        .atm-sub-children {
            padding-left: 16px;
        }

        .atm-minor-cat {
            white-space: normal;
            word-break: break-all;
            line-height: 1.4;
        }

        .atm-toggle {
            display: inline-block;
            width: 12px;
            font-size: 10px;
            text-align: center;
            transition: transform 0.15s;
        }

        .atm-toggle.collapsed {
            transform: rotate(-90deg);
        }

        .atm-children.collapsed {
            display: none;
        }

        .atm-tree-count {
            font-size: 10px;
            font-weight: normal;
            color: #888;
            margin-left: 3px;
        }

        .atm-tree-item.active .atm-tree-count {
            color: rgb(255 255 255 / 50%);
        }

        .atm-sidebar, .atm-main {
            scrollbar-width: none;
            overscroll-behavior: contain;
        }
        .atm-sidebar::-webkit-scrollbar, .atm-main::-webkit-scrollbar { width: 0; }

        .atm-main {
            flex-grow: 1;
            overflow-y: auto;
            padding: 10px;
            background: #fafafa;
        }

        .atm-tags-layout {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-content: flex-start;
        }

        .atm-tag-block {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            background: #fff;
            border: 1px solid #bbb;
            border-left: 3px solid #999;
            padding: 3px 10px;
            cursor: pointer;
            border-radius: 2px;
            box-shadow: 1px 1px 0px rgba(0,0,0,0.1);
            text-align: left;
            min-width: 150px;
            max-width: 100%;
            user-select: none;
            transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.15s ease, background 0.15s ease;
        }

        .atm-tag-block:hover {
            transform: translateY(-1px);
            box-shadow: 2px 2px 6px rgba(0,0,0,0.12);
            filter: brightness(0.96); /* 色を変えずに全体をほんのり暗くする */
        }

        .atm-tag-block:active {
            transform: scale(0.97);
            box-shadow: inset 1px 1px 4px rgba(0,0,0,0.15) !important;
            filter: brightness(0.92); /* 押した時はもう少し暗くする */
        }

        .atm-tag-mythic {
            border-color: rgba(244, 67, 54, 0.6) !important;
            box-shadow: 0 0 6px rgba(244, 67, 54, 0.45);
            z-index: 2;
        }

        .atm-tag-en {
            font-family: var(--atm-font-en), monospace;
            font-weight: bold;
            font-size: var(--atm-font-size-en);
            color: #000;
        }

        .atm-tag-meta {
            display: flex;
            gap: 8px;
            margin-top: 0;
            font-family: var(--atm-font-jp), sans-serif;
            font-size: var(--atm-font-size-jp);
            color: #555;
        }

        .atm-gacha-area {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 3px 12px;
            background: #f5f5f5;
            border-top: 1px solid #ddd;
            z-index: 10;
        }

        /* ガチャドロップダウンは上方向に開く */
        .atm-gacha-dropdown .atm-dropdown-menu {
            top: auto;
            bottom: calc(100% + 4px);
            transform: translateY(4px);
            max-height: 200px;
            overflow-y: auto;
            scrollbar-width: none;
        }
        .atm-gacha-dropdown .atm-dropdown-menu::-webkit-scrollbar { width: 0; }

        .atm-gacha-dropdown.atm-dropdown-open .atm-dropdown-menu {
            transform: translateY(0);
        }

        .atm-gacha-btn {
            background: none;
            color: #999;
            border: 1px solid #d0d0d0;
            padding: 2px 10px;
            font-size: 10px;
            font-weight: 500;
            border-radius: 4px;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.15s ease;
        }

        .atm-gacha-btn:hover {
            background: rgba(0,0,0,0.03);
            color: #666;
            border-color: #bbb;
        }

        .atm-gacha-btn:active {
            background: rgba(0,0,0,0.06);
        }

        /* ガチャモーダル */
        .atm-gacha-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.35);
            z-index: 100000;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
        }

        .atm-gacha-overlay > * {
            pointer-events: auto;
        }

        .atm-gacha-overlay.atm-gacha-overlay-enter {
            animation: gachaOverlayIn 0.25s ease;
        }

        .atm-gacha-overlay.atm-gacha-overlay-exit {
            animation: gachaOverlayOut 0.25s ease forwards;
        }

        .atm-gacha-overlay.atm-gacha-overlay-exit .atm-gacha-modal {
            animation: gachaModalOut 0.25s ease forwards;
        }

        @keyframes gachaOverlayIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes gachaOverlayOut {
            from { opacity: 1; }
            to { opacity: 0; }
        }

        @keyframes gachaModalOut {
            from { transform: scale(1) translateY(0); opacity: 1; }
            to { transform: scale(0.92) translateY(20px); opacity: 0; }
        }

        .atm-gacha-modal {
            position: relative;
            background: #1a1a2e;
            border-radius: 12px;
            padding: 30px 40px;
            min-width: 340px;
            max-width: 440px;
            text-align: center;
            overflow: hidden;
            box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
        }

        .atm-gacha-modal.atm-gacha-modal-enter {
            animation: gachaModalIn 0.35s ease-out;
        }

        @keyframes gachaModalIn {
            from { transform: scale(0.85) translateY(20px); opacity: 0; }
            to { transform: scale(1) translateY(0); opacity: 1; }
        }

        .atm-gacha-modal-flash {
            position: absolute;
            inset: 0;
            opacity: 0;
            pointer-events: none;
            z-index: 1;
        }

        .atm-gacha-modal-particles {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 2;
            overflow: hidden;
        }

        .atm-gacha-particle {
            position: absolute;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            animation: gachaParticleFall 1.5s ease-out forwards;
        }

        @keyframes gachaParticleFall {
            0% { transform: translateY(0) rotate(0deg); opacity: 1; }
            100% { transform: translateY(200px) rotate(720deg); opacity: 0; }
        }

        .atm-gacha-modal-rarity-label {
            position: relative;
            z-index: 3;
            font-size: 13px;
            font-weight: bold;
            letter-spacing: 0.15em;
            margin-bottom: 16px;
            height: 20px;
            line-height: 20px;
            overflow: hidden;
        }

        /* スロットマシン */
        .atm-gacha-slot-machine {
            position: relative;
            z-index: 3;
            margin-bottom: 20px;
        }

        .atm-gacha-slot-frame {
            position: relative;
            background: #111;
            border: 2px solid #444;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 15px rgba(0,0,0,0.3);
        }

        .atm-gacha-slot-window {
            height: 180px;
            overflow: hidden;
            position: relative;
        }

        .atm-gacha-slot-window::before,
        .atm-gacha-slot-window::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            height: 40px;
            z-index: 5;
            pointer-events: none;
        }

        .atm-gacha-slot-window::before {
            top: 0;
            background: linear-gradient(to bottom, rgba(17,17,17,0.9), transparent);
        }

        .atm-gacha-slot-window::after {
            bottom: 0;
            background: linear-gradient(to top, rgba(17,17,17,0.9), transparent);
        }

        .atm-gacha-slot-reel {
            transition: transform 0.1s linear;
        }

        .atm-gacha-slot-item {
            height: 60px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 4px 16px;
            box-sizing: border-box;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }

        .atm-gacha-slot-item-en {
            font-family: var(--atm-font-en), monospace;
            font-weight: bold;
            font-size: 14px;
            color: rgba(255,255,255,0.7);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        .atm-gacha-slot-item-rarity {
            font-size: 9px;
            letter-spacing: 0.05em;
            margin-top: 2px;
        }

        .atm-gacha-slot-line {
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 0;
            border-top: 1px solid rgba(255, 200, 0, 0.5);
            border-bottom: 1px solid rgba(255, 200, 0, 0.5);
            transform: translateY(-1px);
            z-index: 6;
        }

        .atm-gacha-slot-line::before,
        .atm-gacha-slot-line::after {
            content: '';
            position: absolute;
            top: -8px;
            width: 3px;
            height: 16px;
            background: rgba(255, 200, 0, 0.5);
            border-radius: 1px;
        }

        .atm-gacha-slot-line::before { left: 0; }
        .atm-gacha-slot-line::after { right: 0; }

        /* 結果情報（スロット下、常に表示で高さ固定） */
        .atm-gacha-result-info {
            position: relative;
            z-index: 3;
            height: 28px;
            display: flex;
            gap: 10px;
            justify-content: center;
            align-items: center;
            font-family: var(--atm-font-jp), sans-serif;
            font-size: 12px;
            color: rgba(255,255,255,0.3);
            margin: 6px 0 14px;
            padding: 0 12px;
            transition: all 0.4s ease;
        }

        .atm-gacha-result-info.atm-gacha-result-active {
            color: rgba(255,255,255,0.7);
        }

        .atm-gacha-result-info .atm-gacha-result-count {
            font-size: 11px;
            opacity: 0.7;
        }

        /* コイン表示（モーダル内） */
        .atm-gacha-modal-coin-info {
            position: relative;
            z-index: 3;
            margin-top: 16px;
            padding: 6px 14px;
            font-size: 13px;
            font-weight: bold;
            color: #d4a843;
            background: rgba(212,168,67,0.08);
            border: 1px solid rgba(212,168,67,0.2);
            border-radius: 6px;
            display: inline-block;
        }

        .atm-gacha-coin-delta {
            font-size: 11px;
            font-weight: normal;
            margin-left: 6px;
            display: inline-block;
            animation: coinDeltaPop 0.4s ease-out;
        }

        .atm-gacha-coin-delta.atm-coin-plus { color: #4CAF50; }
        .atm-gacha-coin-delta.atm-coin-minus { color: #e57373; }

        @keyframes coinDeltaPop {
            0% { transform: scale(1.6) translateY(-4px); opacity: 0; }
            50% { transform: scale(1.1) translateY(-1px); opacity: 1; }
            100% { transform: scale(1) translateY(0); opacity: 1; }
        }

        .atm-gacha-modal-actions {
            position: relative;
            z-index: 3;
            display: flex;
            gap: 8px;
            justify-content: center;
        }

        .atm-gacha-modal-btn {
            padding: 7px 18px;
            font-size: 12px;
            border: 1px solid rgba(255,255,255,0.25);
            border-radius: 6px;
            background: rgba(255,255,255,0.1);
            color: #fff;
            cursor: pointer;
            transition: all 0.15s;
        }

        .atm-gacha-modal-btn:hover {
            background: rgba(255,255,255,0.2);
        }

        /* レア度別モーダル演出 */
        .atm-gacha-rarity-common .atm-gacha-slot-frame { border-color: rgba(153,153,153,0.4); }
        .atm-gacha-rarity-uncommon .atm-gacha-slot-frame { border-color: rgba(76,175,80,0.5); box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 12px rgba(76,175,80,0.15); }
        .atm-gacha-rarity-rare .atm-gacha-slot-frame { border-color: rgba(33,150,243,0.5); box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 15px rgba(33,150,243,0.2); }
        .atm-gacha-rarity-epic .atm-gacha-slot-frame { border-color: rgba(156,39,176,0.6); box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(156,39,176,0.25); }
        .atm-gacha-rarity-legendary .atm-gacha-slot-frame { border-color: rgba(255,152,0,0.6); box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 25px rgba(255,152,0,0.3); }
        .atm-gacha-rarity-mythic .atm-gacha-slot-frame {
            border-color: rgba(244,67,54,0.7);
            box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 30px rgba(244,67,54,0.3);
        }

        .atm-gacha-rarity-mythic .atm-gacha-modal {
            background: linear-gradient(124deg, #1a0a0e, #2e0a1a, #1a0a2e, #0a1a2e);
            background-size: 400% 400%;
            animation: gachaMythicBg 6s ease infinite;
        }

        @keyframes gachaMythicBg {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }


        .atm-infobar {
            padding: 3px 12px;
            background: #f0f0f0;
            border-top: 1px solid #ddd;
            font-size: 11px;
            color: #777;
            text-align: center;
            line-height: 1.5;
            flex-shrink: 0;
            z-index: 10;
        }

        /* ガチャモーダル フラッシュ演出 */
        @keyframes gachaFlash {
            0% { opacity: 0.8; }
            100% { opacity: 0; }
        }

        @keyframes gachaShake {
            0%, 100% { transform: translateX(0); }
            20% { transform: translateX(-4px); }
            40% { transform: translateX(4px); }
            60% { transform: translateX(-3px); }
            80% { transform: translateX(3px); }
        }

        .atm-popup {
            position: fixed;
            bottom: 170px;
            left: 50%;
            transform: translateX(-50%) translateY(8px);
            background: rgba(20, 50, 80, 0.78);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: #fff;
            padding: 10px 20px;
            font-size: 13px;
            border-radius: 8px;
            z-index: 999999;
            box-shadow: 0 4px 20px rgba(10,30,60,0.3);
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
            pointer-events: none;
        }

        .atm-popup.atm-popup-show {
            opacity: 0.88;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        /* ===== Favorites FAB ===== */
        .atm-fav-fab {
            position: absolute;
            bottom: 82px;
            right: 10px;
            z-index: 15;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 6px 12px 6px 9px;
            border: 1px solid #ccc;
            border-radius: 6px;
            background: #f0f0f0;
            color: #555;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
            transition: all 0.3s ease;
            white-space: nowrap;
            overflow: visible;
            font-family: inherit;
        }
        .atm-fav-fab-icon {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
            color: #d4a017;
        }
        .atm-fav-fab-text {
            transition: opacity 0.3s ease, max-width 0.4s cubic-bezier(0.22,1,0.36,1), margin 0.4s ease;
            max-width: 140px;
            opacity: 1;
            overflow: hidden;
            display: inline-block;
        }
        .atm-fav-fab.atm-fav-fab-shrunk {
            padding: 8px;
            border-radius: 6px;
            gap: 0;
        }
        .atm-fav-fab.atm-fav-fab-shrunk .atm-fav-fab-text {
            max-width: 0;
            opacity: 0;
            margin: 0;
            padding: 0;
            display: none;
        }
        .atm-fav-fab:hover {
            background: #e8e8e8;
            border-color: #bbb;
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
            transform: translateY(-1px);
        }
        .atm-fav-fab:active {
            transform: translateY(0) scale(0.97);
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
        }
        .atm-fav-fab-badge {
            display: none;
            position: absolute;
            top: -6px;
            right: -6px;
            min-width: 16px;
            height: 16px;
            padding: 0 4px;
            border-radius: 8px;
            background: #d4a017;
            color: #fff;
            font-size: 9px;
            font-weight: 700;
            line-height: 16px;
            text-align: center;
            box-shadow: 0 1px 3px rgba(212,160,23,0.35);
        }
        .atm-fav-fab-badge.atm-fav-badge-show {
            display: block;
        }

        /* ===== Favorites Panel ===== */
        @keyframes atmFavOpen {
            0% { opacity: 0; transform: translateY(30px) scale(0.85); }
            60% { opacity: 1; transform: translateY(-8px) scale(1.02); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }
        @keyframes atmFavClose {
            0% { opacity: 1; transform: translateY(0) scale(1); }
            100% { opacity: 0; transform: translateY(20px) scale(0.9); }
        }
        .atm-fav-panel {
            position: absolute;
            bottom: 46px;
            right: 10px;
            z-index: 16;
            width: 360px;
            max-height: calc(100% - 90px);
            display: none;
            flex-direction: column;
            border: 1px solid rgba(180,180,180,0.6);
            border-radius: 6px;
            background: rgba(252, 252, 253, 0.65);
            backdrop-filter: blur(18px) saturate(1.2);
            -webkit-backdrop-filter: blur(18px) saturate(1.2);
            color: #333;
            box-shadow: 0 2px 12px rgba(0,0,0,0.08);
            overflow: hidden;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            pointer-events: auto;
            user-select: none;
        }
        .atm-fav-panel input,
        .atm-fav-panel textarea {
            user-select: text;
        }
        .atm-fav-panel.atm-fav-panel-open {
            display: flex;
            animation: atmFavOpen 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }
        .atm-fav-panel.atm-fav-panel-size-m {
            width: 480px;
        }
        .atm-fav-panel.atm-fav-panel-size-l {
            width: 600px;
        }
        .atm-fav-panel.atm-fav-beside-pb {
            right: 400px;
        }
        .atm-fav-panel.atm-fav-panel-closing {
            display: flex;
            animation: atmFavClose 0.25s cubic-bezier(0.55, 0, 1, 0.45) forwards;
        }
        .atm-fav-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 4px 10px 4px 12px;
            border-bottom: 1px solid rgba(0,0,0,0.07);
            flex-shrink: 0;
        }
        .atm-fav-search-wrap {
            display: flex;
            align-items: center;
            padding: 0 10px;
            border-bottom: 1px solid rgba(0,0,0,0.05);
            flex-shrink: 0;
            position: relative;
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            transition: max-height 0.18s ease-out, padding 0.18s ease-out, opacity 0.15s ease;
        }
        .atm-fav-search-wrap.atm-fav-search-open {
            max-height: 34px;
            padding: 4px 10px;
            opacity: 1;
        }
        .atm-fav-search-icon {
            position: absolute;
            left: 18px;
            color: #bbb;
            pointer-events: none;
        }
        .atm-fav-search {
            flex: 1;
            height: 24px;
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 4px;
            padding: 0 22px 0 26px;
            font-size: 11px;
            background: rgba(255,255,255,0.5);
            outline: none;
            color: #333;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }
        .atm-fav-search:focus { border-color: #d4a017; box-shadow: 0 0 0 2px rgba(212,160,23,0.1); }
        .atm-fav-search::placeholder { color: #c0c0c0; }
        .atm-fav-search-clear {
            position: absolute;
            right: 14px;
            background: none;
            border: none;
            color: #bbb;
            font-size: 14px;
            cursor: pointer;
            padding: 0 2px;
            line-height: 1;
            display: none;
        }
        .atm-fav-search-clear:hover { color: #888; }
        .atm-fav-chip.atm-fav-chip-search-dim { opacity: 0.2; }
        .atm-fav-folder.atm-fav-folder-search-hide { display: none; }
        .atm-fav-chip.atm-fav-chip-selected {
            outline: 2px solid #d4a017;
            outline-offset: -1px;
            background: rgba(212,160,23,0.1);
        }
        /* マーキー選択ボックス（デスクトップOS風） */
        .atm-fav-body { position: relative; }
        .atm-fav-marquee {
            position: absolute;
            border: 2px solid rgba(212,160,23,0.7);
            background: rgba(212,160,23,0.12);
            border-radius: 3px;
            pointer-events: none;
            z-index: 10;
            display: none;
            box-shadow: 0 0 0 1px rgba(212,160,23,0.15);
        }
        .atm-fav-marquee-badge {
            position: fixed;
            pointer-events: none;
            background: rgba(212,160,23,0.92);
            color: #fff;
            font-size: 11px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 10px;
            z-index: 100010;
            opacity: 0;
            transition: opacity 0.15s ease;
            white-space: nowrap;
        }
        .atm-fav-marquee-badge-show { opacity: 1; }
        .atm-fav-chip.atm-fav-chip-marquee-hover {
            outline: 2px solid #d4a017;
            outline-offset: -1px;
            background: rgba(212,160,23,0.1) !important;
        }
        /* コンテキストメニュー（Mac風） */
        .atm-fav-ctx-menu {
            position: fixed;
            z-index: 100010;
            min-width: 170px;
            background: rgba(252,252,253,0.92);
            backdrop-filter: blur(18px) saturate(1.3);
            -webkit-backdrop-filter: blur(18px) saturate(1.3);
            border: 1px solid rgba(0,0,0,0.12);
            border-radius: 7px;
            box-shadow: 0 5px 24px rgba(0,0,0,0.16), 0 1px 4px rgba(0,0,0,0.08);
            padding: 4px 0;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            opacity: 0;
            transform: scale(0.92);
            transform-origin: top left;
            transition: opacity 0.12s ease, transform 0.12s ease;
            pointer-events: none;
            user-select: none;
        }
        .atm-fav-ctx-menu-show {
            opacity: 1;
            transform: scale(1);
            pointer-events: auto;
        }
        .atm-fav-ctx-menu-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 5px 14px;
            font-size: 12px;
            color: #222;
            cursor: pointer;
            transition: background 0.08s ease;
            white-space: nowrap;
        }
        .atm-fav-ctx-menu-item:hover { background: rgba(212,160,23,0.12); }
        .atm-fav-ctx-menu-item:active { background: rgba(212,160,23,0.22); }
        .atm-fav-ctx-menu-item svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.6; }
        .atm-fav-ctx-menu-item-danger { color: #d93025; }
        .atm-fav-ctx-menu-item-danger:hover { background: rgba(217,48,37,0.08); }
        .atm-fav-ctx-menu-item-disabled {
            color: #aaa;
            pointer-events: none;
        }
        .atm-fav-ctx-menu-sep {
            height: 1px;
            background: rgba(0,0,0,0.07);
            margin: 3px 0;
        }
        .atm-fav-title {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 700;
            color: #d4a017;
        }
        .atm-fav-close, .atm-fav-folder-add {
            background: none;
            border: none;
            border-radius: 4px;
            color: #999;
            cursor: pointer;
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            transition: all 0.2s ease;
            flex-shrink: 0;
        }
        .atm-fav-close:hover { background: rgba(0,0,0,0.06); color: #666; }
        .atm-fav-search-toggle {
            background: none;
            border: none;
            border-radius: 4px;
            color: #bbb;
            cursor: pointer;
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            transition: all 0.15s ease;
            flex-shrink: 0;
        }
        .atm-fav-search-toggle:hover { background: rgba(0,0,0,0.06); color: #888; }
        .atm-fav-search-toggle.atm-fav-search-toggle-active { color: #d4a017; }
        .atm-fav-folder-add {
            color: #d4a017;
            font-size: 10px;
            font-weight: 600;
            margin-left: auto;
            width: auto;
            padding: 0 6px;
            gap: 2px;
            white-space: nowrap;
        }
        .atm-fav-folder-add:hover { background: rgba(212,160,23,0.12); color: #b8860b; }
        /* お気に入り歯車メニュー */
        .atm-fav-gear-wrap {
            position: relative;
            display: flex;
            flex-shrink: 0;
        }
        .atm-fav-gear-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 22px;
            height: 22px;
            border: none;
            border-radius: 4px;
            background: none;
            color: #bbb;
            cursor: pointer;
            padding: 0;
            transition: all 0.2s ease;
        }
        .atm-fav-gear-btn:hover { background: rgba(0,0,0,0.06); color: #888; }
        .atm-fav-gear-btn.atm-fav-gear-open { color: #888; }
        .atm-fav-gear-btn svg {
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .atm-fav-gear-btn.atm-fav-gear-open svg {
            transform: rotate(60deg);
        }
        .atm-fav-gear-menu {
            position: absolute;
            top: calc(100% + 4px);
            right: 0;
            z-index: 120;
            padding: 6px 0;
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 6px;
            background: rgba(255,255,255,0.92);
            backdrop-filter: blur(16px) saturate(1.3);
            -webkit-backdrop-filter: blur(16px) saturate(1.3);
            box-shadow: 0 4px 16px rgba(0,0,0,0.1);
            display: none;
            animation: atmGearOpen 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .atm-fav-gear-menu.atm-fav-gear-menu-open {
            display: block;
        }
        .atm-fav-gear-label {
            padding: 2px 10px;
            font-size: 9px;
            color: #aaa;
            letter-spacing: 0.3px;
        }
        .atm-fav-gear-segment {
            display: flex;
            margin: 2px 8px 4px;
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 5px;
            overflow: hidden;
            background: rgba(0,0,0,0.03);
        }
        .atm-fav-gear-seg-btn {
            flex: 1;
            padding: 3px 10px;
            border: none;
            background: transparent;
            font-size: 10px;
            color: #999;
            cursor: pointer;
            transition: all 0.15s ease;
            position: relative;
            white-space: nowrap;
        }
        .atm-fav-gear-seg-btn:not(:last-child)::after {
            content: '';
            position: absolute;
            right: 0;
            top: 20%;
            height: 60%;
            width: 1px;
            background: rgba(0,0,0,0.08);
        }
        .atm-fav-gear-seg-btn:hover {
            background: rgba(0,0,0,0.04);
            color: #666;
        }
        .atm-fav-gear-seg-btn.atm-fav-gear-seg-active {
            background: #fff;
            color: #444;
            font-weight: 600;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }
        .atm-fav-gear-seg-btn.atm-fav-gear-seg-active::after {
            display: none;
        }
        .atm-fav-gear-divider {
            height: 1px;
            background: rgba(0,0,0,0.06);
            margin: 4px 8px;
        }
        .atm-fav-gear-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 4px 10px;
            cursor: pointer;
            white-space: nowrap;
        }
        .atm-fav-gear-toggle:hover {
            background: rgba(0,0,0,0.03);
        }
        .atm-fav-gear-toggle-text {
            font-size: 10px;
            color: #888;
        }
        .atm-switch-sm {
            width: 28px;
            height: 16px;
        }
        .atm-switch-sm .atm-switch-slider::before {
            height: 10px;
            width: 10px;
            left: 3px;
            bottom: 3px;
        }
        .atm-switch-sm input:checked + .atm-switch-slider::before {
            transform: translateX(12px);
        }
        .atm-fav-panel.atm-fav-hide-add-btn .atm-fav-tag-add-btn {
            display: none;
        }
        /* フォントサイズモード */
        .atm-fav-panel.atm-fav-size-m .atm-fav-chip { font-size: 13px; }
        .atm-fav-panel.atm-fav-size-l .atm-fav-chip { font-size: 14px; }
        .atm-fav-folder-input {
            flex: 1;
            height: 20px;
            border: 1px solid rgba(0,0,0,0.12);
            border-radius: 4px;
            padding: 0 8px;
            font-size: 11px;
            background: rgba(255,255,255,0.6);
            outline: none;
        }
        .atm-fav-folder-input:focus { border-color: #d4a017; box-shadow: 0 0 0 2px rgba(212,160,23,0.12); }
        .atm-fav-tag-add-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 22px;
            height: 20px;
            border: 1px dashed rgba(0,0,0,0.15);
            border-radius: 5px;
            background: none;
            color: #bbb;
            font-size: 14px;
            cursor: pointer;
            padding: 0;
            transition: all 0.15s ease;
            flex-shrink: 0;
        }
        .atm-fav-tag-add-btn:hover { border-color: #d4a017; color: #d4a017; background: rgba(212,160,23,0.05); }
        .atm-fav-tag-input {
            width: 100px;
            height: 20px;
            border: 1px solid rgba(212,160,23,0.4);
            border-radius: 4px;
            padding: 0 6px;
            font-size: 11px;
            background: rgba(255,255,255,0.8);
            outline: none;
            animation: atmChipIn 0.2s ease;
        }
        .atm-fav-tag-input:focus { border-color: #d4a017; box-shadow: 0 0 0 2px rgba(212,160,23,0.12); }
        .atm-fav-body {
            overflow-y: auto;
            flex-grow: 1;
            padding: 0;
            scrollbar-width: none;
            overscroll-behavior: contain;
        }
        .atm-fav-body::-webkit-scrollbar { width: 0; }
        .atm-fav-empty {
            padding: 24px 16px;
            color: #aaa;
            font-size: 11px;
            text-align: center;
            line-height: 1.6;
        }
        .atm-fav-folder {
            border-bottom: none;
        }
        .atm-fav-folder:last-child { border-bottom: none; }
        .atm-fav-folder-header {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 3px 10px;
            cursor: grab;
            user-select: none;
            font-size: 11px;
            font-weight: 600;
            color: #444;
            background: rgba(0,0,0,0.018);
            transition: background 0.12s ease;
            border-radius: 5px;
            margin: 0 4px;
            letter-spacing: 0.01em;
        }
        .atm-fav-folder-header:hover { background: rgba(0,0,0,0.04); }
        .atm-fav-folder-children {
            padding-left: 4px;
            margin-left: 10px;
            border-left: 1px solid rgba(0,0,0,0.06);
        }
        .atm-fav-folder-header.atm-fav-folder-dragover-nest {
            background: rgba(212,160,23,0.1);
            box-shadow: inset 0 0 0 1.5px rgba(212,160,23,0.3);
        }
        @keyframes atmFolderSlideIn {
            0%   { opacity: 0; transform: translateY(-6px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        .atm-fav-folder.atm-fav-folder-moved {
            animation: atmFolderSlideIn 0.3s cubic-bezier(0.22, 0.68, 0, 1);
        }
        .atm-fav-folder-color-dot {
            width: 3px;
            align-self: stretch;
            border-radius: 3px;
            flex-shrink: 0;
            cursor: pointer;
            transition: width 0.15s ease, opacity 0.15s ease;
            margin: 1px 0;
            position: relative;
            opacity: 0.75;
        }
        .atm-fav-folder-color-dot::before {
            content: '';
            position: absolute;
            top: -2px; bottom: -2px; left: -8px; right: -6px;
        }
        .atm-fav-folder-color-dot:hover { width: 5px; opacity: 1; }
        .atm-fav-folder-color-picker {
            position: absolute;
            left: 10px;
            top: 100%;
            z-index: 20;
            display: flex;
            gap: 4px;
            padding: 5px 7px;
            background: #fff;
            border: 1px solid rgba(0,0,0,0.12);
            border-radius: 6px;
            box-shadow: 0 3px 12px rgba(0,0,0,0.12);
        }
        .atm-fav-folder-color-opt {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 2px solid transparent;
            cursor: pointer;
            transition: transform 0.1s ease, border-color 0.1s ease;
            padding: 0;
            background: none;
        }
        .atm-fav-folder-color-opt:hover { transform: scale(1.2); }
        .atm-fav-folder-color-opt.atm-fav-color-active { border-color: #333; }
        .atm-fav-folder-header.atm-fav-folder-dragover-above {
            box-shadow: 0 -2px 0 0 #d4a017;
        }
        .atm-fav-folder-header.atm-fav-folder-dragover-below {
            box-shadow: 0 2px 0 0 #d4a017;
        }
        .atm-fav-folder-arrow {
            font-size: 9px;
            color: #888;
            transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 14px;
            height: 14px;
            border-radius: 3px;
            flex-shrink: 0;
        }
        .atm-fav-folder-arrow:hover {
            background: rgba(0,0,0,0.06);
        }
        .atm-fav-folder.atm-fav-folder-collapsed > .atm-fav-folder-header > .atm-fav-folder-arrow {
            transform: rotate(-90deg);
        }
        .atm-fav-folder-name {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 60%;
        }
        .atm-fav-folder-count {
            font-size: 10px;
            color: #999;
            font-weight: 400;
            opacity: 0.7;
        }
        .atm-fav-folder-del, .atm-fav-folder-copy, .atm-fav-folder-rename {
            background: none;
            border: none;
            cursor: pointer;
            padding: 2px;
            line-height: 1;
            border-radius: 4px;
            transition: all 0.12s ease;
            flex-shrink: 0;
            opacity: 0;
        }
        .atm-fav-folder-header:hover .atm-fav-folder-del,
        .atm-fav-folder-header:hover .atm-fav-folder-copy,
        .atm-fav-folder-header:hover .atm-fav-folder-rename {
            opacity: 1;
        }
        .atm-fav-folder-del {
            color: #bbb;
            font-size: 13px;
        }
        .atm-fav-folder-del:hover { color: #e8453c; background: rgba(232,69,60,0.06); }
        .atm-fav-folder-rename {
            color: #bbb;
            font-size: 11px;
            position: relative;
        }
        .atm-fav-folder-rename::before {
            content: '';
            position: absolute;
            top: -6px; right: -5px; bottom: -6px; left: -5px;
        }
        .atm-fav-folder-rename:hover { color: #d4a017; background: rgba(212,160,23,0.06); }
        .atm-fav-folder-copy {
            color: #bbb;
            font-size: 11px;
            position: relative;
        }
        .atm-fav-folder-copy::before {
            content: '';
            position: absolute;
            top: -6px; right: -5px; bottom: -6px; left: -5px;
        }
        .atm-fav-folder-copy:hover { color: #2e8fd1; background: rgba(46,143,209,0.06); }
        .atm-fav-folder-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            padding: 3px 10px 5px 26px;
            overflow: hidden;
            transition: max-height 0.18s ease-out, padding 0.18s ease-out, opacity 0.15s ease;
            opacity: 1;
        }
        .atm-fav-panel.atm-fav-hide-add-btn .atm-fav-folder-tags-nopad {
            padding: 3px 0;
        }
        .atm-fav-folder-content {
            overflow: hidden;
            transition: max-height 0.18s ease-out, opacity 0.15s ease;
        }
        .atm-fav-folder-content.atm-no-transition {
            transition: none !important;
        }
        .atm-fav-folder.atm-fav-folder-collapsed > .atm-fav-folder-content,
        .atm-fav-folder.atm-fav-auto-collapsed > .atm-fav-folder-content {
            max-height: 0;
            opacity: 0;
        }
        .atm-fav-folder.atm-fav-auto-collapsed > .atm-fav-folder-header > .atm-fav-folder-arrow {
            transform: rotate(-90deg);
        }
        .atm-fav-folder-tags-empty {
            font-size: 10px;
            color: #bbb;
            padding: 2px 0;
        }
        .atm-fav-chip {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            padding: 2px 5px 2px 8px;
            border: 1px solid rgba(0,0,0,0.08);
            border-left: 3px solid var(--chip-color, #999);
            border-radius: 5px;
            background: rgba(255,255,255,0.5);
            font-size: 12px;
            color: #333;
            white-space: nowrap;
            cursor: pointer;
            user-select: none;
            transition: opacity 0.18s ease;
        }
        .atm-fav-chip.atm-fav-chip-new {
            animation: atmChipIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        @keyframes atmChipMove {
            0%   { opacity: 0; transform: scale(0.3); }
            40%  { opacity: 1; transform: scale(1.1); }
            60%  { transform: scale(0.95); }
            80%  { transform: scale(1.03); }
            100% { transform: scale(1); }
        }
        .atm-fav-chip.atm-fav-chip-moved {
            animation: atmChipMove 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .atm-fav-chip:hover { opacity: 0.8; }
        .atm-fav-chip:active { opacity: 0.55; }
        .atm-fav-chip.atm-fav-chip-dragging:active { opacity: 1; }
        .atm-fav-chip.atm-fav-chip-dragover {
            outline: 2px solid rgba(212,160,23,0.6);
            outline-offset: -1px;
            background: rgba(212,160,23,0.08);
        }
        .atm-fav-chip.atm-fav-chip-dragover-before {
            box-shadow: -3px 0 0 0 #d4a017;
        }
        .atm-fav-chip.atm-fav-chip-dragover-after {
            box-shadow: 3px 0 0 0 #d4a017;
        }
        .atm-fav-chip-x {
            background: none;
            border: none;
            color: #bbb;
            font-size: 13px;
            line-height: 1;
            cursor: pointer;
            padding: 0 1px;
            border-radius: 3px;
            transition: all 0.15s ease;
            position: relative;
        }
        .atm-fav-chip-x::before {
            content: '';
            position: absolute;
            top: -6px;
            right: -6px;
            bottom: -6px;
            left: -6px;
        }
        .atm-fav-chip-x:hover { color: #e8453c; background: rgba(232,69,60,0.08); }
        /* カスタムツールチップ */
        .atm-fav-tooltip {
            position: fixed;
            z-index: 9999;
            padding: 4px 10px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.72);
            backdrop-filter: blur(16px) saturate(1.4);
            -webkit-backdrop-filter: blur(16px) saturate(1.4);
            color: #555;
            font-size: 11px;
            font-weight: 500;
            letter-spacing: 0.2px;
            white-space: nowrap;
            pointer-events: none;
            opacity: 0;
            transform: translate(-50%, -100%) translateY(4px) scale(0.92);
            transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 2px 10px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.06);
        }
        .atm-fav-tooltip.atm-fav-tooltip-show {
            opacity: 1;
            transform: translate(-50%, -100%) translateY(0) scale(1);
        }
        .atm-fav-footer {
            display: flex;
            align-items: center;
            padding: 5px 12px;
            border-top: 1px solid rgba(0,0,0,0.07);
            flex-shrink: 0;
        }
        .atm-fav-count-display {
            font-size: 10px;
            color: #999;
            flex-shrink: 0;
        }
        .atm-fav-footer-actions {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 2px;
        }
        .atm-fav-footer-sep {
            font-size: 9px;
            color: rgba(0,0,0,0.15);
        }
        .atm-fav-export, .atm-fav-import {
            background: none;
            border: none;
            color: rgba(0,0,0,0.25);
            font-size: 9px;
            cursor: pointer;
            padding: 1px 3px;
            border-radius: 3px;
            transition: all 0.15s ease;
        }
        .atm-fav-export:hover, .atm-fav-import:hover {
            color: #d4a017;
            background: rgba(212,160,23,0.08);
        }

        /* ===== Prompt Builder FAB ===== */
        .atm-pb-fab {
            position: absolute;
            bottom: 46px;
            right: 10px;
            z-index: 15;
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px 6px 9px;
            border: 1px solid #ccc;
            border-radius: 6px;
            background: #f0f0f0;
            color: #555;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
            transition: all 0.3s ease;
            white-space: nowrap;
            overflow: visible;
            font-family: inherit;
        }
        .atm-pb-fab-icon {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
            color: #888;
        }
        .atm-pb-fab-text {
            transition: opacity 0.3s ease, max-width 0.4s cubic-bezier(0.22,1,0.36,1), margin 0.4s ease;
            max-width: 140px;
            opacity: 1;
            overflow: hidden;
            display: inline-block;
        }
        .atm-pb-fab.atm-pb-fab-shrunk {
            padding: 8px;
            border-radius: 6px;
            gap: 0;
        }
        .atm-pb-fab.atm-pb-fab-shrunk .atm-pb-fab-text {
            max-width: 0;
            opacity: 0;
            margin: 0;
            padding: 0;
            display: none;
        }
        .atm-pb-fab:hover {
            background: #e8e8e8;
            border-color: #bbb;
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
            transform: translateY(-1px);
        }
        .atm-pb-fab:active {
            transform: translateY(0) scale(0.97);
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
        }
        .atm-pb-fab-badge {
            display: none;
            position: absolute;
            top: -6px;
            right: -6px;
            min-width: 16px;
            height: 16px;
            padding: 0 4px;
            border-radius: 8px;
            background: #e8453c;
            color: #fff;
            font-size: 9px;
            font-weight: 700;
            line-height: 16px;
            text-align: center;
            box-shadow: 0 1px 3px rgba(232,69,60,0.35);
        }
        .atm-pb-fab-badge.atm-pb-badge-show {
            display: block;
        }

        /* ===== Prompt Builder Panel ===== */
        @keyframes atmPbOpen {
            0% {
                opacity: 0;
                transform: translateY(30px) scale(0.85);
            }
            60% {
                opacity: 1;
                transform: translateY(-8px) scale(1.02);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        @keyframes atmPbClose {
            0% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
            100% {
                opacity: 0;
                transform: translateY(20px) scale(0.9);
            }
        }

        .atm-pb-panel {
            position: absolute;
            bottom: 46px;
            right: 10px;
            z-index: 14;
            width: 380px;
            max-height: calc(100% - 90px);
            display: none;
            flex-direction: column;
            border: 1px solid rgba(180,180,180,0.6);
            border-radius: 6px;
            background: rgba(252, 252, 253, 0.65);
            backdrop-filter: blur(18px) saturate(1.2);
            -webkit-backdrop-filter: blur(18px) saturate(1.2);
            color: #333;
            box-shadow: 0 2px 12px rgba(0,0,0,0.08);
            overflow: hidden;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            pointer-events: auto;
            user-select: none;
        }
        .atm-pb-panel input,
        .atm-pb-panel textarea {
            user-select: text;
        }
        .atm-pb-panel.atm-pb-panel-open {
            display: flex;
            animation: atmPbOpen 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }
        .atm-pb-panel.atm-pb-panel-closing {
            display: flex;
            animation: atmPbClose 0.25s cubic-bezier(0.55, 0, 1, 0.45) forwards;
        }

        .atm-pb-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 7px 10px 7px 12px;
            border-bottom: 1px solid rgba(0,0,0,0.07);
        }
        .atm-pb-title {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.04em;
            color: #2e8fd1;
        }
        .atm-pb-title-icon {
            width: 15px;
            height: 15px;
            color: #2e8fd1;
        }
        .atm-pb-fav-toggle {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            background: rgba(212,160,23,0.05);
            border: 1px solid rgba(212,160,23,0.18);
            border-radius: 4px;
            color: #caa63a;
            font-size: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            padding: 3px 8px;
            margin-left: auto;
            white-space: nowrap;
        }
        .atm-pb-fav-toggle svg {
            flex-shrink: 0;
        }
        .atm-pb-fav-toggle:hover { background: rgba(212,160,23,0.1); border-color: rgba(212,160,23,0.3); color: #b8960f; }
        .atm-pb-fav-toggle.atm-pb-fav-toggle-active { background: rgba(212,160,23,0.08); border-color: rgba(212,160,23,0.25); color: #c49315; }
        .atm-pb-close {
            background: none;
            border: none;
            border-radius: 4px;
            color: #999;
            font-size: 18px;
            line-height: 1;
            width: 24px;
            height: 24px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }
        .atm-pb-close:hover {
            background: rgba(0, 0, 0, 0.06);
            color: #666;
        }
        .atm-pb-close svg {
            display: block;
        }

        .atm-pb-tags-area {
            flex-grow: 1;
            overflow-y: auto;
            padding: 10px 12px;
            min-height: 90px;
            max-height: 300px;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-content: flex-start;
            scrollbar-width: none;
        }
        .atm-pb-tags-area::-webkit-scrollbar { width: 0; }

        .atm-pb-chip.atm-pb-chip-dragging {
            opacity: 0.4;
        }
        .atm-pb-chip.atm-pb-chip-dragover {
            box-shadow: -3px 0 0 0 #2e8fd1;
        }

        .atm-pb-input-row {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-top: 1px solid rgba(0,0,0,0.06);
        }
        .atm-pb-text-input {
            width: 100%;
            box-sizing: border-box;
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 5px 8px;
            font-size: 12px;
            background: rgba(255, 255, 255, 0.5);
            color: #333;
            outline: none;
            transition: border-color 0.2s ease;
        }
        .atm-pb-text-input:focus {
            border-color: rgba(46, 143, 209, 0.5);
            box-shadow: 0 0 0 2px rgba(46, 143, 209, 0.1);
            background: rgba(255, 255, 255, 0.9);
        }
        .atm-pb-text-input::placeholder {
            color: #aaa;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }
        .atm-pb-btn-add {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 5px 10px;
            border: none;
            border-radius: 6px;
            background: rgba(46, 143, 209, 0.1);
            color: #2e8fd1;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: inherit;
            white-space: nowrap;
        }
        .atm-pb-btn-add:hover {
            background: rgba(46, 143, 209, 0.2);
        }
        .atm-pb-input-wrapper {
            position: relative;
            flex: 1;
        }
        .atm-pb-ac-dropdown {
            position: fixed;
            max-height: 60vh;
            overflow-y: auto;
            background: rgba(255,255,255,0.45);
            backdrop-filter: blur(20px) saturate(1.4);
            -webkit-backdrop-filter: blur(20px) saturate(1.4);
            border: 1px solid rgba(0,0,0,0.08);
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.10);
            z-index: 999999;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            scrollbar-width: none;
            /* アニメーション */
            opacity: 0;
            transform: translateY(6px) scale(0.97);
            pointer-events: none;
            transition: opacity 0.18s ease, transform 0.18s ease;
        }
        .atm-pb-ac-dropdown.atm-pb-ac-visible {
            opacity: 1;
            transform: translateY(0) scale(1);
            pointer-events: auto;
        }
        .atm-pb-ac-dropdown::-webkit-scrollbar { width: 0; }
        .atm-pb-ac-item {
            display: flex;
            align-items: baseline;
            gap: 6px;
            padding: 3px 12px;
            cursor: pointer;
            font-size: 12px;
            border-bottom: 1px solid rgba(0,0,0,0.04);
            border-left: 2px solid #999;
            transition: background 0.1s ease, filter 0.1s ease;
        }
        .atm-pb-ac-item:last-child { border-bottom: none; }
        .atm-pb-ac-item:hover,
        .atm-pb-ac-item.atm-pb-ac-active {
            filter: brightness(0.95);
        }
        .atm-pb-ac-en {
            font-weight: 600;
            color: #333;
            flex-shrink: 0;
        }
        .atm-pb-ac-jp {
            color: #888;
            font-size: 11px;
            flex-shrink: 0;
        }
        .atm-pb-ac-count {
            color: #aaa;
            font-size: 10px;
            margin-left: auto;
            flex-shrink: 0;
        }

        .atm-pb-empty {
            width: 100%;
            text-align: center;
            color: #aaa;
            font-size: 12px;
            padding: 20px 0;
            user-select: none;
        }

        .atm-pb-chip {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 6px 4px 10px;
            border: 1px solid rgba(0,0,0,0.1);
            border-left: 3px solid var(--chip-color, #999);
            border-radius: 6px;
            background: rgba(255,255,255,0.55);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            color: #333;
            font-size: 12px;
            white-space: nowrap;
            animation: atmChipIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
            user-select: none;
            cursor: grab;
        }
        .atm-pb-chip:active {
            cursor: grabbing;
        }
        @keyframes atmChipIn {
            0% { opacity: 0; transform: scale(0.7); }
            100% { opacity: 1; transform: scale(1); }
        }
        .atm-pb-chip-x {
            background: none;
            border: none;
            color: #aaa;
            font-size: 15px;
            line-height: 1;
            cursor: pointer;
            padding: 0 2px;
            border-radius: 4px;
            transition: all 0.15s ease;
        }
        .atm-pb-chip-x:hover {
            color: #e8453c;
            background: rgba(232, 69, 60, 0.08);
        }

        .atm-pb-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            border-top: 1px solid rgba(0,0,0,0.06);
        }
        .atm-pb-count-display {
            font-size: 11px;
            color: #999;
        }
        .atm-pb-count-num {
            color: #2e8fd1;
            font-weight: 700;
        }
        .atm-pb-actions {
            display: flex;
            gap: 6px;
        }
        .atm-pb-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 5px 10px;
            border-radius: 6px;
            border: none;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: inherit;
        }
        .atm-pb-btn-clear {
            background: rgba(0, 0, 0, 0.05);
            color: #888;
        }
        .atm-pb-btn-clear:hover {
            background: rgba(232, 69, 60, 0.1);
            color: #e8453c;
        }
        .atm-pb-btn-copy {
            background: #2e8fd1;
            color: #fff;
            box-shadow: 0 1px 4px rgba(46,143,209,0.25);
        }
        .atm-pb-btn-copy:hover {
            background: #3ba0e6;
            box-shadow: 0 3px 10px rgba(46,143,209,0.3);
            transform: translateY(-1px);
        }
        .atm-pb-btn-copy:active {
            transform: translateY(0) scale(0.97);
        }

        /* ===== Related Tag: ⋮ icon ===== */
        .atm-related-enabled .atm-tag-block {
            position: relative;
            padding-right: 22px;
        }
        .atm-tag-block .atm-related-trigger {
            position: absolute;
            right: 1px;
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: #888;
            cursor: pointer;
            opacity: 0;
            background-color: transparent;
            transition: all 0.2s ease;
            user-select: none;
            z-index: 2;
            line-height: 1;
        }
        /* PC：親ブロックにホバーでフワッと出現 */
        .atm-tag-block:hover .atm-related-trigger {
            opacity: 0.6;
        }
        .atm-tag-block .atm-related-trigger:hover {
            opacity: 1;
            color: #007cba;
            background-color: rgba(0, 124, 186, 0.1);
        }
        .atm-tag-block .atm-related-trigger:active {
            transform: translateY(-50%) scale(0.9);
            background-color: rgba(0, 124, 186, 0.18);
        }
        /* タッチデバイス：ホバーが使えないので常時うっすら表示 + タップしやすいエリア */
        @media (hover: none) {
            .atm-related-enabled .atm-tag-block {
                padding-right: 30px;
            }
            .atm-tag-block .atm-related-trigger {
                opacity: 0.3;
                width: 28px;
                height: 28px;
                font-size: 16px;
            }
            .atm-tag-block .atm-related-trigger:active {
                opacity: 1;
                color: #007cba;
                background-color: rgba(0, 124, 186, 0.12);
                transform: translateY(-50%) scale(0.92);
            }
        }

        /* ===== Related Tag Popup ===== */
        @keyframes atmRelatedOpen {
            0% {
                opacity: 0;
                transform: scale(0.7) translateY(8px);
                filter: blur(4px);
            }
            50% {
                opacity: 1;
                transform: scale(1.03) translateY(-2px);
                filter: blur(0);
            }
            100% {
                opacity: 1;
                transform: scale(1) translateY(0);
                filter: blur(0);
            }
        }
        @keyframes atmRelatedClose {
            0% {
                opacity: 1;
                transform: scale(1) translateY(0);
                filter: blur(0);
            }
            100% {
                opacity: 0;
                transform: scale(0.85) translateY(10px);
                filter: blur(3px);
            }
        }
        @keyframes atmRelatedItemIn {
            0% {
                opacity: 0;
                transform: translateX(-8px);
            }
            100% {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .atm-related-popup {
            position: fixed;
            z-index: 999998;
            min-width: 230px;
            max-width: 370px;
            max-height: none;
            background: rgba(252, 252, 253, 0.65);
            backdrop-filter: blur(18px) saturate(1.2);
            -webkit-backdrop-filter: blur(18px) saturate(1.2);
            border: 1px solid rgba(180, 180, 180, 0.5);
            border-radius: 8px;
            box-shadow: 0 6px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
            display: none;
            flex-direction: column;
            overflow: hidden;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            pointer-events: auto;
        }
        .atm-related-popup.atm-related-popup-show {
            display: flex;
            animation: atmRelatedOpen 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }
        .atm-related-popup.atm-related-popup-closing {
            display: flex;
            animation: atmRelatedClose 0.2s cubic-bezier(0.55, 0, 1, 0.45) forwards;
        }
        .atm-related-popup-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 10px 5px 12px;
            border-bottom: 1px solid rgba(0,0,0,0.07);
            flex-shrink: 0;
        }
        .atm-related-popup-title {
            font-size: 11px;
            font-weight: 700;
            color: #2e8fd1;
            letter-spacing: 0.03em;
        }
        .atm-related-count-wrap {
            display: flex;
            align-items: center;
            margin-left: auto;
            margin-right: 6px;
            gap: 2px;
        }
        .atm-related-count-input {
            width: 32px;
            height: 20px;
            border: 1px solid rgba(0,0,0,0.15);
            border-radius: 3px;
            text-align: center;
            font-size: 11px;
            color: #555;
            background: rgba(255,255,255,0.7);
            padding: 0 2px;
            outline: none;
            -moz-appearance: textfield;
        }
        .atm-related-count-input::-webkit-outer-spin-button,
        .atm-related-count-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .atm-related-count-input:focus {
            border-color: #2e8fd1;
            box-shadow: 0 0 0 2px rgba(46,143,209,0.15);
        }
        .atm-related-count-unit {
            font-size: 10px;
            color: rgba(0,0,0,0.25);
            user-select: none;
        }
        .atm-related-popup-close {
            background: none;
            border: none;
            border-radius: 4px;
            color: #999;
            font-size: 16px;
            line-height: 1;
            width: 22px;
            height: 22px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }
        .atm-related-popup-close:hover {
            background: rgba(0,0,0,0.06);
            color: #666;
        }
        .atm-related-popup-inner {
            overflow-y: auto;
            padding: 0;
            scrollbar-width: none;
            flex-grow: 1;
        }
        .atm-related-popup-inner::-webkit-scrollbar { width: 0; }
        .atm-related-popup-loading {
            padding: 16px;
            color: #888;
            font-size: 12px;
            text-align: center;
        }
        .atm-related-popup-empty {
            padding: 16px;
            color: #aaa;
            font-size: 12px;
            text-align: center;
        }
        .atm-related-item {
            display: flex;
            align-items: baseline;
            gap: 6px;
            padding: 3px 12px;
            cursor: pointer;
            font-size: 12px;
            border-bottom: 1px solid rgba(0,0,0,0.04);
            border-left: 2px solid #999;
            transition: opacity 0.15s ease, box-shadow 0.3s ease;
            user-select: none;
            animation: atmRelatedItemIn 0.2s ease both;
        }
        .atm-related-item:last-child {
            border-bottom: none;
        }
        .atm-related-item:hover {
            opacity: 0.8;
        }
        .atm-related-item:active {
            opacity: 0.55;
        }
        /* （クリック・お気に入りアニメーションはJS transitionで実装） */
        .atm-related-item-en {
            font-weight: 600;
            color: #333;
            flex-shrink: 0;
        }
        .atm-related-item-jp {
            color: #777;
            font-size: 11px;
            flex-shrink: 0;
        }
        .atm-related-item-count {
            color: #aaa;
            font-size: 10px;
            margin-left: auto;
            flex-shrink: 0;
        }

        /* ===== Minimal Scrollbar Mode ===== */
        .atm-mscroll-track {
            position: absolute;
            width: 14px;
            z-index: 10;
            opacity: 0;
            transition: opacity 0.25s ease;
            pointer-events: none;
            cursor: pointer;
            /* top, left, height are set by JS via syncTrackPosition */
        }
        .atm-mscroll-track.atm-mscroll-visible {
            opacity: 1;
            pointer-events: auto;
        }
        .atm-mscroll-track.atm-mscroll-hidden {
            opacity: 0 !important;
            pointer-events: none !important;
        }
        .atm-mscroll-thumb {
            position: absolute;
            top: 0;
            right: 1px;
            width: 3px;
            min-height: 24px;
            background: rgba(0, 0, 0, 0.18);
            border-radius: 3px;
            transition: background 0.15s ease;
            cursor: pointer;
        }
        .atm-mscroll-track:hover .atm-mscroll-thumb,
        .atm-mscroll-thumb.atm-mscroll-dragging {
            width: 5px;
            right: 0;
            background: rgba(0, 0, 0, 0.30);
        }

        /* ===== Responsive ===== */
        @media (max-width: 768px) {
            .atm-app-container {
                height: 85vh;
                resize: none;
            }
            .atm-app-container::after {
                display: none;
            }
            .atm-top-bar {
                flex-direction: column;
                align-items: stretch;
            }
            .atm-search-box input {
                width: 100%;
            }
            .atm-content-area {
                flex-direction: column;
            }
            .atm-sidebar {
                width: 100%;
                min-width: 100%;
                height: 30%;
                border-right: none;
                border-bottom: 2px solid #999;
            }
            .atm-main {
                height: 70%;
            }
            .atm-fav-fab {
                bottom: 70px;
                right: 6px;
                padding: 5px 10px 5px 8px;
                font-size: 11px;
            }
            .atm-fav-panel {
                bottom: 36px;
                right: 4px;
                left: 4px;
                width: auto !important;
                max-height: calc(100% - 50px);
            }
            .atm-fav-panel-size-section {
                display: none;
            }
            .atm-fav-panel.atm-fav-beside-pb {
                right: 4px;
            }
            .atm-fav-footer-actions {
                display: none;
            }
            .atm-pb-fab {
                bottom: 36px;
                right: 6px;
                padding: 5px 10px 5px 8px;
                font-size: 11px;
            }
            .atm-pb-panel {
                bottom: 36px;
                right: 4px;
                left: 4px;
                width: auto;
                max-height: calc(100% - 50px);
            }
            .atm-pb-text-input {
                font-size: 14px;
            }
        }
