:root {
    color-scheme: light;
    --bg-main: #ffffff;
    --bg-sidebar: #f7f7f5;
    --bg-hover: #efefed;
    --text-main: #37352f;
    --text-muted: #9a9a97;
    --border: #e9e9e7;
    --accent: #2383e2;
    --font-family: 'Noto Sans JP', system-ui, -apple-system, sans-serif;
}

body.dark-mode {
    color-scheme: dark;
    --bg-main: #22272e;
    --bg-sidebar: #1c2128;
    --bg-hover: #2d333b;
    --text-main: #adbac7;
    --text-muted: #768390;
    --border: #444c56;
}

/* ================= 基本 ================= */

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

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

body {
    font-family: var(--font-family);
    color: var(--text-main);
    display: flex;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg-main);
    transition: background 0.2s, color 0.2s;
}

.hidden {
    display: none !important;
}

.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
}

::-webkit-scrollbar {
    width: 6px;
}

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


/* ================= アニメーション定義 ================= */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-8px);
    }

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

@keyframes blockInsert {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.fade-in-up {
    animation: fadeInUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#overlay:not(.hidden),
#search-overlay:not(.hidden),
#link-overlay:not(.hidden),
#ext-link-overlay:not(.hidden),
#settings-overlay:not(.hidden),
#login-overlay:not(.hidden) {
    animation: fadeIn 0.15s ease-out;
}

.modal,
.settings-modal,
.search-modal,
.login-split-container {
    animation: modalPop 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
}

#slash-menu:not(.hidden),
#context-menu:not(.hidden),
#floating-menu:not(.hidden) {
    animation: modalPop 0.12s ease-out;
}


/* ================= サイドバー周辺 ================= */

#sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#search-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 8px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#search-btn:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

#search-btn:active {
    transform: scale(0.95);
}

.sidebar-home {
    margin: 6px 8px 0;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    color: var(--text-muted);
    border-radius: 6px;
}

.sidebar-home:hover,
.sidebar-home.active {
    background: var(--bg-hover);
    color: var(--text-main);
}

.tree-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    padding-bottom: 50vh;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    margin-bottom: 2px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    border-radius: 6px;
}

.tree-item:hover,
.tree-item.active {
    background: var(--bg-hover);
    color: var(--text-main);
}

/* 深い階層の現在地 (#8)：現在ページの祖先はタイトルを太字にして経路を示す */
.tree-item.ancestor .tree-title {
    font-weight: 600;
}

/* 並び替え（#3）：ドラッグ中の項目とドロップ位置の表示 */
.tree-item.dragging {
    opacity: 0.5;
}
.tree-item.drop-before {
    box-shadow: inset 0 2px 0 var(--accent);
}
.tree-item.drop-after {
    box-shadow: inset 0 -2px 0 var(--accent);
}

/* キーボード操作 (R2-5)：div 実装のコントロールにフォーカスが見えるようにする */
.tree-toggle:focus-visible,
.todo-checkbox:focus-visible,
.toggle-icon:focus-visible,
.drag-handle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.tree-toggle {
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.tree-title {
    flex: 1;
    margin-left: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* モバイル導線 (#6)：ツリー項目の「…」ボタン。デスクトップではホバー/フォーカス時に
   現れ、タッチ端末（hover なし）では常時薄く表示してタップできるようにする。 */
.tree-item-menu {
    flex: none;
    width: 32px;
    height: 32px;
    margin-left: 4px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}
.tree-item:hover .tree-item-menu,
.tree-item-menu:focus-visible {
    opacity: 1;
    background: var(--bg-hover);
}
@media (hover: none) {
    .tree-item-menu { opacity: 0.65; }
}

.sidebar-footer {
    padding: 12px;
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border);
}

#add-page-btn,
#trash-btn,
#settings-btn {
    padding: 8px 12px;
    border: 1px dashed var(--border);
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

#settings-btn {
    flex: 0;
    border-style: solid;
    padding: 8px;
    min-height: 40px;
}

#add-page-btn:hover,
#settings-btn:hover {
    background: var(--bg-hover);
    color: var(--text-main);
    border-color: var(--text-muted);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

#add-page-btn:active,
#settings-btn:active {
    transform: scale(0.97);
}


/* ================= メイン・エディタ周辺 ================= */

#main {
    flex: 1;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.home-wrapper {
    width: 100%;
    max-width: 800px;
    padding: 60px 40px 0;
    flex: 1;
}

.home-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 32px;
}

.home-section h2 {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 600;
}

.recent-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.recent-page-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    background: transparent;
}

.recent-page-card:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.recent-page-card:active {
    transform: translateY(0) scale(0.98);
}

.recent-page-card span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.editor-wrapper {
    width: 100%;
    max-width: 800px;
    padding: 80px 20px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    gap: 6px;
}

.breadcrumb-item {
    cursor: pointer;
    transition: color 0.15s;
}

.breadcrumb-item:hover {
    color: var(--text-main);
    text-decoration: underline;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

#page-title {
    font-size: 30px;
    font-weight: 700;
    border: none;
    width: 100%;
    color: var(--text-main);
    background: transparent;
}

.lock-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    gap: 4px;
    align-items: center;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

.lock-btn:active {
    transform: scale(0.98);
}

.lock-btn.locked {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(35, 131, 226, 0.1);
}


/* ================= ブロック ================= */

.block-wrapper {
    display: flex;
    flex-direction: column;
    padding: 1px 0;
    animation: blockInsert 0.15s ease-out;
}

.block-main {
    display: flex;
    align-items: flex-start;
    position: relative;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.block-wrapper:hover > .block-main {
    background-color: rgba(0, 0, 0, 0.015);
}

body.dark-mode .block-wrapper:hover > .block-main {
    background-color: rgba(255, 255, 255, 0.015);
}

.block-children {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

/* Block operations (#11): the drag handle used to appear only on hover, so on
   touch devices its existence was invisible and the block menu was unreachable.
   Show it faintly at all times on touch devices, widen the tap target to 32px,
   and also show it when the block has keyboard focus. */
.drag-handle {
    flex: none;
    width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s ease;
    touch-action: none;
}

.block-main:hover .drag-handle,
.block-main:focus-within .drag-handle {
    opacity: 1;
}

@media (hover: none) {
    .drag-handle { opacity: 0.65; }
}

.block-content {
    flex: 1;
    min-height: 24px;
    padding: 4px 2px;
    line-height: 1.6;
    font-size: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.block-content:focus[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    position: absolute;
    pointer-events: none;
}

/* スラッシュメニューの発見性（#17）：ブロックが1つだけの空ページでは、フォーカス前から
   ヒント（'/' または MarkDown記法）を表示する。入力が始まると :empty が外れて消える。 */
#editor .block-wrapper:only-child .block-content[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    position: absolute;
    pointer-events: none;
}

.block-content img {
    max-width: 100%;
    border-radius: 6px;
    display: block;
    margin: 8px 0;
}

.block-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.block-content a:hover {
    opacity: 0.8;
}

.block-wrapper[data-type="h1"] > .block-main > .block-content {
    font-size: 30px;
    font-weight: 700;
    margin-top: 12px;
}

.block-wrapper[data-type="h2"] > .block-main > .block-content {
    font-size: 24px;
    font-weight: 600;
    margin-top: 8px;
}

.block-wrapper[data-type="h3"] > .block-main > .block-content {
    font-size: 20px;
    font-weight: 600;
    margin-top: 4px;
}

.todo-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    margin-right: 8px;
    margin-top: 9px;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.todo-checkbox:hover {
    border-color: var(--accent);
    transform: scale(1.12);
}

.block-wrapper[data-type="todo"].checked > .block-main > .todo-checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.block-wrapper[data-type="todo"].checked > .block-main > .block-content {
    text-decoration: line-through;
    color: var(--text-muted);
}

.toggle-icon {
    width: 20px;
    cursor: pointer;
    margin-right: 4px;
    margin-top: 5px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
}

.block-wrapper[data-type="toggle"].open > .block-main > .toggle-icon {
    transform: rotate(90deg);
}

.block-wrapper[data-type="toggle"]:not(.open) > .block-children {
    display: none;
}

.block-wrapper[data-type="toggle"].open > .block-children {
    display: block;
    animation: slideDown 0.15s ease-out;
}

.page-title-input:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted, #9a9a97);
    pointer-events: none;
}

.block-wrapper[data-type="image"] .block-content {
    display: inline-block;
    cursor: pointer;
    border-radius: 6px;
    padding: 2px;
    transition: box-shadow 0.2s ease;
}

.block-wrapper[data-type="image"] .block-content:focus {
    box-shadow: 0 0 0 2px var(--accent);
}

.block-wrapper[data-type="image"] img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}


/* ================= フローティングメニューとカラーパレット ================= */

#floating-menu {
    position: absolute;
    background: rgba(34, 34, 34, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 4px 8px;
    border-radius: 8px;
    display: flex;
    gap: 4px;
    z-index: 3000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
}

#floating-menu button {
    background: none;
    border: none;
    color: white;
    width: 36px;
    height: 40px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.1s ease;
}

#floating-menu button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.color-picker-wrapper {
    position: relative;
    display: inline-block;
}

.color-picker-wrapper button small {
    font-size: 8px;
    margin-left: 2px;
    color: #aaa;
}

.color-palette {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(34, 34, 34, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    width: 120px;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 3100;
}

.color-palette::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
}

.color-picker-wrapper:hover .color-palette {
    display: flex;
    animation: fadeIn 0.1s ease-out;
}

.color-palette button {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    font-size: 16px !important;
    margin: 2px;
    border: 1px solid #444 !important;
}


/* ================= モーダル群・グラスモフィズム ================= */

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-main);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}


/* ================= ログイン画面 ================= */

#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.login-split-container {
    display: flex;
    width: 90%;
    max-width: 960px;
    height: 70vh;
    min-height: 500px;
    background: var(--bg-main);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

body.dark-mode .login-split-container {
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}

.login-hero {
    flex: 1;
    background: linear-gradient(
        145deg,
        var(--bg-hover) 0%,
        var(--bg-sidebar) 100%
    );
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-hero p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

.login-features {
    list-style: none;
    padding: 0;
}

.login-features li {
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.login-features li .icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.login-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    padding: 40px;
}


/* ================= 共通オーバーレイ ================= */

#search-overlay,
#link-overlay,
#ext-link-overlay,
#settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal,
.settings-modal,
.search-modal {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    width: 320px;
    text-align: center;
}

body.dark-mode .modal,
body.dark-mode .settings-modal,
body.dark-mode .search-modal {
    background: rgba(30, 33, 39, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}


/* ================= モーダル入力 ================= */

.modal input,
.modal select {
    width: 100%;
    padding: 10px 12px;
    margin: 12px 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal input:focus,
.modal select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.18);
}

.primary-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
    font-weight: 500;
    background: var(--text-main);
    color: var(--bg-main);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.primary-btn:active {
    transform: scale(0.98);
}

.cancel-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
    background: transparent;
    color: var(--text-muted);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.cancel-btn:active {
    transform: scale(0.98);
}


/* ================= 検索 ================= */

.search-modal {
    width: 500px;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 12px;
    text-align: left;
}

.search-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
    border-radius: 6px;
}

.search-item:hover {
    background: var(--bg-hover);
}

.search-item mark {
    background: #fff3a3;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}
/* ダークモードでは明るい黄色ハイライトに薄文字が重なって読めないため、濃い琥珀色＋淡い黄文字にする */
body.dark-mode .search-item mark {
    background: #7c5f00;
    color: #ffe9a3;
}


/* ================= スラッシュメニュー・コンテキストメニュー ================= */

#slash-menu,
#context-menu,
#block-menu {
    position: absolute;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 11000;
    padding: 6px;
}

body.dark-mode #slash-menu,
body.dark-mode #context-menu,
body.dark-mode #block-menu {
    background: rgba(30, 33, 39, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#slash-menu {
    width: 200px;
}

.slash-item {
    padding: 8px 12px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.1s ease;
    border-radius: 6px;
}

.slash-item.selected,
.slash-item:hover {
    background: var(--bg-hover);
}

#context-menu {
    width: 160px;
    font-size: 14px;
}

.menu-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.1s ease;
    border-radius: 6px;
}

.menu-item:hover {
    background: var(--bg-hover);
}

.menu-item.delete {
    color: #d93025;
}


/* ================= 設定 ================= */

.settings-modal {
    width: 600px;
    height: 400px;
    border-radius: 12px;
    display: flex;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.settings-sidebar {
    width: 200px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    flex-shrink: 0;
}

.settings-tab {
    padding: 12px 24px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.settings-tab.active,
.settings-tab:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.settings-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    text-align: left;
}


/* ================= プログレスバー ================= */

.storage-bar-container {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease, background 0.3s ease;
}

.storage-bar-fill.warning {
    background: #e37400;
}

.storage-bar-fill.danger {
    background: #d93025;
}


/* ================= 共通ボタン ================= */

.close-icon-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-hover);
    border: none;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    z-index: 100;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.close-icon-btn:hover {
    background: #d93025;
    color: white;
}

.danger-btn {
    background: #d93025;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-weight: 500;
}

.danger-btn:hover {
    background: #b3261e;
}

.danger-btn:active {
    transform: scale(0.98);
}

.mobile-topbar {
    display: none;
}


/* ================= パスワード入力 ================= */

.password-input-wrapper {
    position: relative;
    margin: 12px 0;
    display: flex;
    width: 100%;
}

.password-input-wrapper input {
    margin: 0 !important;
    padding-right: 40px !important;
    width: 100%;
}

.toggle-password-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
    z-index: 2;
}

.toggle-password-btn:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

/* ================= 認証フォーム ================= */

.login-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    padding: 40px;
    box-sizing: border-box;
}

#auth-form {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
}

#auth-form > input,
#auth-form .password-input-wrapper input {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
}

#auth-form > input {
    margin: 0 0 12px 0;
}

#auth-form .password-input-wrapper {
    width: 100%;
    margin: 0 0 12px 0;
    position: relative;
    display: flex;
}

#auth-password-confirm-wrapper.hidden {
    display: none !important;
}

#auth-password-confirm-wrapper:not(.hidden) {
    display: flex;
}

#auth-form #auth-submit-btn,
#auth-form #auth-toggle-btn {
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
}

#otp-container {
    width: 100%;
}

#otp-container input {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
}

#otp-container button {
    width: 100%;
    margin-top: 8px;
}


/* ================= ログイン画面のボタン視認性向上 ================= */
#auth-form .primary-btn,
#otp-container .primary-btn {
    background-color: #2383e2 !important; /* 強制的に青色背景 */
    color: #ffffff !important;           /* 強制的に白文字 */
    border: none !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

#auth-form .primary-btn:hover,
#otp-container .primary-btn:hover {
    opacity: 0.8 !important;
}

#auth-form .cancel-btn,
#otp-container .cancel-btn {
    background-color: transparent !important; 
    color: var(--text-main) !important;
    border: 1px solid var(--border) !important;
    font-weight: 600 !important;
}

#auth-form .cancel-btn:hover,
#otp-container .cancel-btn:hover {
    background-color: var(--bg-hover) !important;
}
.block-handle {
    position: relative;
    z-index: 10; /* 他の要素より手前に配置する */
    cursor: pointer;
}
/* ================= 複数ブロック選択 ================= */
.selected-block > .block-main {
    background-color: rgba(35, 131, 226, 0.15) !important;
}
body.dark-mode .selected-block > .block-main {
    background-color: rgba(35, 131, 226, 0.25) !important;
}
/* ================= エディタ下部の余白 ================= */
#editor-bottom-padding {
    height: 50vh !important; /* 画面の半分の高さを確保（スクロール可能に） */
    cursor: text;
}

/* ================= テーブル (表) ================= */
.motion-table {
    border-collapse: collapse;
    width: 100%;
    margin: 4px 0;
    table-layout: fixed;
}
.motion-table td {
    border: 1px solid var(--border);
    padding: 8px;
    min-width: 50px;
    vertical-align: top;
    outline: none;
    transition: background-color 0.2s;
}
.motion-table td:focus {
    background-color: var(--bg-hover); /* フォーカス中のセルをうっすらハイライト */
}
/* テーブル操作ボタン群 */
.table-controls {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    user-select: none;
}
/* ブロックにホバーした時だけ操作ボタンを表示 */
.block-wrapper:hover .table-controls,
.table-controls:focus-within {
    opacity: 1;
}
.table-controls button {
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    color: var(--text-muted);
}
.table-controls button:hover {
    background: var(--border);
    color: var(--text-main);
}

/* ================= モバイルツールバー制御 ================= */
#mobile-toolbar {
    display: none;
}

@media (max-width: 1024px) {

    input, select, textarea {
        font-size: 16px !important;
    }

    #sidebar {
        display: flex;
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        height: 100dvh;
        width: 260px;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10001;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
    }

    #sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 10000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-topbar {
        display: flex;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 2000;
        background: var(--bg-main);
        padding: 12px 16px;
        align-items: center;
        border-bottom: 1px solid var(--border);
    }

    #sidebar-toggle-btn {
        padding: 16px; 
        margin-left: -16px; 
        background: transparent;
        border: none;
        color: var(--text-main);
        cursor: pointer;
    }

    /* トップバー被り防止・余白・サイズ調整 */
    #home-wrapper,
    #editor-wrapper {
        padding-top: 90px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    #page-title,
    .home-title {
        font-size: 28px !important;
    }

    .page-header {
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 24px;
    }

    .settings-modal {
        flex-direction: column;
        width: 90%;
        height: 80vh;
    }

    .settings-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        display: flex;
        padding: 0;
        overflow-x: auto;
    }

    .settings-tab {
        white-space: nowrap;
    }

    .login-split-container {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 12px;
    }

    .login-hero {
        padding: 40px 24px;
        text-align: center;
    }

    .login-features {
        display: inline-block;
        text-align: left;
        margin: 0 auto;
    }

    .login-form-container {
        padding: 32px 24px;
    }

    #auth-form {
        max-width: 100%;
    }

    /* ▼▼ モバイルツールバーのスタイル（修正版） ▼▼ */
    #mobile-toolbar {
        display: flex !important;
        position: fixed !important;
        top: 0; 
        bottom: auto !important;
        left: 0 !important;
        width: 100% !important;
        height: 50px !important;
        background: var(--bg-main) !important;
        border-top: 1px solid var(--border) !important;
        justify-content: space-around !important;
        align-items: center !important;
        z-index: 2147483647 !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
        transition: top 0.05s ease-out;
    }

    /* サイドバー表示中はモバイルツールバーを暗転オーバーレイの背面へ下げ、
       フッターのボタンに被らないようにする（.active は全ての開閉経路で付け外しされる） */
    #sidebar-overlay.active ~ #mobile-toolbar {
        z-index: 9999 !important;
    }

    #mobile-toolbar button {
        background: var(--bg-hover);
        border: none;
        padding: 10px 16px;
        border-radius: 6px;
        color: var(--text-main);
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    #editor-bottom-padding {
        height: 60vh !important;
    }

/* ▼▼ モバイル用ボトムシートのスタイル（修正版） ▼▼ */
    #mobile-bottom-sheet-overlay {
        position: fixed;
        /* topとheightはキーボード表示に合わせてJSで動的に制御します */
        top: 0;
        left: 0;
        width: 100vw;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 2147483647;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        transition: opacity 0.2s ease;
    }

    #mobile-bottom-sheet {
        background: var(--bg-main);
        width: 100%;
        /* メニューの高さが見えている画面の90%を超えないように制限 */
        max-height: 90%; 
        border-radius: 16px 16px 0 0;
        display: flex;
        flex-direction: column;
        transform: translateY(100%);
        animation: slideUpSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes slideUpSheet {
        to { transform: translateY(0); }
    }

    .sheet-header {
        padding: 16px;
        border-bottom: 1px solid var(--border);
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: bold;
        flex-shrink: 0; /* ヘッダーが潰れるのを防ぐ */
    }

    .sheet-header button {
        background: none;
        border: none;
        font-size: 18px;
        color: var(--text-muted);
        cursor: pointer;
        min-width: 40px;
        min-height: 40px;
    }

    .sheet-content {
        overflow-y: auto;
        padding: 8px 16px;
        flex: 1; /* 残りの高さをすべてスクロール領域として確保 */
        -webkit-overflow-scrolling: touch; /* iOSでの滑らかなスワイプを有効化 */
        overscroll-behavior: contain;
    }

    .sheet-item {
        padding: 16px 8px;
        border-bottom: 1px solid var(--border);
        display: flex;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .sheet-item:last-child {
        border-bottom: none;
    }

    .sheet-item-title { font-weight: 600; font-size: 15px; }
    .sheet-item-desc { font-size: 12px; color: var(--text-muted); }

}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================= 起動ローダー (Appwrite同期用) ================= */
#appwrite-sync-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-main); /* ダーク/ライトモード対応 */
    z-index: 99990; /* ログイン画面の下、他UIの上に配置 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    opacity: 1;
    visibility: visible;
}

/* 非表示用のクラス */
#appwrite-sync-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* テキストのスタイル */
#appwrite-sync-loader .txt {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-main); /* ダーク/ライトモード対応 */
    margin-top: 32px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* ひし形スピナーのコンテナ */
#appwrite-sync-loader .looping-rhombuses-spinner {
    width: 60px;
    height: 15px;
    position: relative;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* 表示トリガー用のクラス (JSで付与) */
#appwrite-sync-loader .txt.show,
#appwrite-sync-loader .looping-rhombuses-spinner.show {
    opacity: 1;
}

/* ひし形アニメーション本体 */
#appwrite-sync-loader .rhombus {
    width: 15px;
    height: 15px;
    background-color: var(--accent); /* テーマカラー(青)を適用 */
    position: absolute;
    border-radius: 2px;
    transform: translateX(0) rotate(45deg) scale(0);
    animation: looping-rhombuses-anim 2.5s linear infinite;
}

#appwrite-sync-loader .rhombus:nth-child(1) { animation-delay: -1.5s; }
#appwrite-sync-loader .rhombus:nth-child(2) { animation-delay: -1.0s; }
#appwrite-sync-loader .rhombus:nth-child(3) { animation-delay: -0.5s; }

@keyframes looping-rhombuses-anim {
    0%   { transform: translateX(0) rotate(45deg) scale(0); }
    50%  { transform: translateX(22px) rotate(45deg) scale(1); }
    100% { transform: translateX(44px) rotate(45deg) scale(0); }
}

.save-status { font-size: 12px; color: var(--text-muted); white-space: nowrap; align-self: center; }
.save-status.error { color: #d64545; }
/* ページ切替時のローディング表示（#16）：スピナー＋開くページのタイトル＋スケルトン行で、空白ではなく読み込み中であることを見せる */
#inline-loading { padding: 8px 0 20px; }
.inline-loading-title { font-size: 30px; font-weight: 700; color: var(--text-muted); margin-bottom: 16px; min-height: 36px; }
.inline-loading-row { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 14px; padding: 8px 0; }
.skeleton-line { height: 14px; border-radius: 4px; background: var(--bg-hover); margin: 10px 0; animation: skeleton-shimmer 1.4s ease-in-out infinite; }
@keyframes skeleton-shimmer { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .skeleton-line { animation: none; } }
/* Undo/Redo ボタン（#14）：対象はブロック配列のみ。タイトル・ページ操作は対象外のため title で明示。 */
.undo-btn { background: transparent; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; color: var(--text-muted); min-width: 32px; min-height: 40px; font-size: 16px; line-height: 1; align-self: center; }
.undo-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-main); }
.undo-btn:disabled { opacity: 0.4; cursor: default; }

/* ================= ゴミ箱 ================= */

#trash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.trash-modal {
    width: 480px;
    max-width: calc(100% - 32px);
    text-align: left;
}

.trash-modal h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.trash-list {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 12px;
}

.trash-empty {
    padding: 16px 0;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.trash-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.trash-row:last-child {
    border-bottom: 1px solid var(--border);
}

.trash-info {
    flex: 1;
    min-width: 0;
}

.trash-title {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trash-date {
    font-size: 12px;
    color: var(--text-muted);
}

.trash-notice {
    padding: 8px 0 12px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.trash-purge-btn {
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.trash-expiring .trash-date {
    color: #d64545;
    font-weight: bold;
}

.trash-restore-btn,
.trash-permanent-btn {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.trash-permanent-btn {
    color: #d64545;
}

/* ================= ラウンド3 #2: safe-area-inset 対応 =================
   ノッチ／ホームバーのある端末で、画面端の UI が被らないようにする。
   inset が 0 の環境では見た目は変わらない。 */
.sidebar-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 1024px) {
    #mobile-toolbar {
        height: calc(50px + env(safe-area-inset-top, 0px)) !important;
        padding-top: env(safe-area-inset-top, 0px) !important;
    }

    #mobile-bottom-sheet {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

/* ================= ラウンド3 #9: 印刷向けスタイル ================= */
@page {
    margin: 14mm;
}

@media print {
    #sidebar,
    #mobile-toolbar,
    #sidebar-overlay,
    .sidebar-overlay,
    #overlay,
    #login-overlay,
    #appwrite-sync-loader,
    #context-menu,
    #block-menu,
    #floating-menu,
    .modal,
    #trash-overlay,
    #search-overlay,
    #link-overlay,
    #ext-link-overlay,
    #settings-overlay {
        display: none !important;
    }

    html,
    body {
        height: auto !important;
        overflow: visible !important;
        background: #fff !important;
    }

    #editor-wrapper,
    #editor {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        margin: 0 !important;
    }

    * {
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a {
        text-decoration: underline;
    }

    img {
        max-width: 100% !important;
    }

    h1, h2, h3 {
        break-after: avoid;
    }
}

/* ================= ラウンド3 #1: トースト通知・確認ダイアログ =================
   Gemini 3.1 Pro 生成コードをレビューし、既存のオーバーレイ構造に合わせて調整。 */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 200000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

@media (max-width: 768px) {
    #toast-container {
        top: auto;
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        right: 1rem;
        left: 1rem;
    }
}

.toast {
    background-color: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem 2.5rem 1rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 320px;
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .toast {
        transform: translateY(100%);
        width: 100%;
    }
}

.toast.show {
    opacity: 1;
    transform: translate(0);
}

.toast-info { border-left: 4px solid var(--accent); }
.toast-success { border-left: 4px solid #28a745; }
.toast-error { border-left: 4px solid #dc3545; }

.toast-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 4px;
}

.toast-close:hover {
    color: var(--text-main);
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: none;
    }
}

/* 確認ダイアログ：既存オーバーレイ（#trash-overlay 等）と同じ見た目に揃える */
#confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300000;
}

.confirm-modal {
    width: 400px;
    max-width: 92vw;
    text-align: left;
}

#confirm-message {
    white-space: pre-wrap;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

#confirm-ok.danger {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

/* ================= 2026-11-17: モバイルツールバーとオーバーレイ/トーストの競合修正 =================
   #mobile-toolbar は z-index 最大で常時表示されるため、ログイン画面の
   「パスワードを忘れた」や設定モーダル上のトーストが背面に隠れていた。
   対策: (1) フルスクリーンのオーバーレイ/ダイアログ表示中はツールバーを隠す
         (2) トーストはツールバーより前面に出し、モバイルではツールバーの
             高さ分だけ表示位置を上げる（エディタ表示中でも隠れない） */
#toast-container {
    z-index: 2147483647;
}

@media (max-width: 768px) {
    #toast-container {
        bottom: calc(50px + 1rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 1024px) {
    body:has(#login-overlay:not(.hidden)) #mobile-toolbar,
    body:has(#settings-overlay:not(.hidden)) #mobile-toolbar,
    body:has(#search-overlay:not(.hidden)) #mobile-toolbar,
    body:has(#trash-overlay:not(.hidden)) #mobile-toolbar,
    body:has(#link-overlay:not(.hidden)) #mobile-toolbar,
    body:has(#ext-link-overlay:not(.hidden)) #mobile-toolbar,
    body:has(#overlay:not(.hidden)) #mobile-toolbar,
    body:has(#confirm-overlay:not(.hidden)) #mobile-toolbar,
    body:has(#mobile-bottom-sheet-overlay:not(.hidden)) #mobile-toolbar,
    body:has(#auth-dialog-overlay) #mobile-toolbar {
        display: none !important;
    }
}
