:root {
    --p: #2196F3; /* アクセントカラー */
    --p-rgb: 33, 150, 243;
    --bg-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    --clock-f: 'Outfit', sans-serif;
    --clock-c: #ffffff;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background: #0f172a;
}

/* 背景画像とゆらぎグラデーション */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-gradient);
    background-size: 400% 400% !important;
    background-position: center;
    transition: background 1.5s ease, filter 0.5s ease;
    animation: bgShift 20s ease infinite;
}

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

/* ガラスモーフィズムカードの共通設定 */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 24px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                background 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.3);
}

/* ヘッダー */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: relative;
    z-index: 10;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.weather-widget:hover {
    transform: scale(1.03);
}

.weather-widget #weather-icon {
    font-size: 28px;
    color: var(--p);
}

.weather-info {
    display: flex;
    flex-direction: column;
}

#weather-temp {
    font-weight: 700;
}

#weather-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(45deg);
}

.icon-btn-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.icon-btn-small:hover, .icon-btn-small.active {
    background: var(--p);
    border-color: var(--p);
    transform: scale(1.08);
}

/* ヒーローエリア (時計、挨拶、検索) */
.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
    position: relative;
    z-index: 5;
}

.hero-section {
    text-align: center;
    margin: 30px auto 50px;
    max-width: 700px;
}

#clock-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 5px;
}

#clock {
    font-size: clamp(4.5rem, 12vw, 7.5rem);
    font-weight: 800;
    line-height: 1;
    font-family: var(--clock-f);
    color: var(--clock-c);
    letter-spacing: -2px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: font-family 0.3s;
}

#clock-sec {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    margin-left: 8px;
    margin-bottom: 15px;
    font-family: var(--clock-f);
    color: var(--clock-c);
    opacity: 0.8;
    display: none; /* デフォルト非表示 */
}

#date-display {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

#greeting {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 300;
    margin-bottom: 35px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

/* 検索フォーム */
.search-container {
    position: relative;
    max-width: 580px;
    margin: 0 auto;
    z-index: 50;
}

.search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-form:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    transform: scale(1.03);
}

.search-engine-selector {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s, transform 0.2s;
    position: relative;
}

.search-engine-selector:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.search-bar {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 0 15px;
    font-size: 1.1rem;
    color: #fff;
    font-family: inherit;
}

.search-bar::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-button {
    background: var(--p);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s, transform 0.2s;
}

.search-button:hover {
    background: rgba(var(--p-rgb), 0.8);
    transform: scale(1.05);
}

/* 検索エンジンドロップダウン */
.search-engines-dropdown {
    display: none;
    position: absolute;
    top: 65px;
    left: 10px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 6px;
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 100;
}

.search-engines-dropdown.active {
    display: block;
    animation: dropdownPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes dropdownPop {
    from { opacity: 0; transform: translateY(-10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.engine-option {
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s, padding-left 0.2s;
    text-align: left;
}

.engine-option:hover {
    background: rgba(255, 255, 255, 0.15);
    padding-left: 18px;
}

/* お知らせボード */
.notice-board {
    max-width: 700px;
    margin: 0 auto 40px;
    background: rgba(239, 68, 68, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 12px 20px;
    border-radius: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}

.notice-tag {
    font-weight: 700;
    font-size: 0.75rem;
    background: rgba(239, 68, 68, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

#notice-text {
    flex: 1;
    text-align: left;
}

/* メインコンテナグリッド */
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 30px;
}

main {
    grid-column: span 7;
}

aside {
    grid-column: span 5;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (max-width: 960px) {
    main { grid-column: span 12; }
    aside { grid-column: span 12; }
}

/* カードヘッダー */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 12px;
}

.card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.card h3 span {
    color: var(--p);
}

/* ニュースカード */
.news-categories-wrapper {
    overflow-x: auto;
    white-space: nowrap;
    max-width: 70%;
    scrollbar-width: none; /* Firefox */
}
.news-categories-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.news-categories {
    display: inline-flex;
    gap: 8px;
    padding: 2px 0;
}

.news-tab {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.news-tab.active, .news-tab:hover {
    background: rgba(var(--p-rgb), 0.15);
    color: #fff;
    border-color: rgba(var(--p-rgb), 0.3);
}

.news-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 5px;
}

.news-list::-webkit-scrollbar {
    width: 6px;
}
.news-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.news-list li {
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s;
    border: 1px solid rgba(255,255,255,0.02);
    animation: newsItemFade 0.4s ease both;
}

@keyframes newsItemFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.news-list li:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(3px);
}

.news-list a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
}

/* ブックマークカード */
.bookmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.bookmark-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-align: center;
    padding: 10px;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.bookmark-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.05);
}

.bookmark-item .icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin-bottom: 8px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--p);
    font-size: 1.2rem;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bookmark-item:hover .icon-wrapper {
    background: rgba(var(--p-rgb), 0.15);
    border-color: rgba(var(--p-rgb), 0.3);
    color: #fff;
    transform: scale(1.05);
}

.bookmark-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.bookmark-title {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* タブを囲むラッパーコンテナ */
.bookmark-tabs-container {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

/* 左右の矢印ボタンのデザイン */
.tab-scroll-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    flex-shrink: 0;
    backdrop-filter: blur(5px);
}

.tab-scroll-btn:hover {
    background: rgba(var(--p-rgb), 0.2);
    color: #fff;
    border-color: rgba(var(--p-rgb), 0.4);
    transform: scale(1.1);
}

.tab-scroll-btn span {
    font-size: 18px;
}

.tab-scroll-btn.prev {
    margin-right: 6px;
}

.tab-scroll-btn.next {
    margin-left: 6px;
}

/* ブックマークフォルダ切り替えタブ（※PC完全スクロール対応） */
.bookmark-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;       /* 横スクロールを明示的に許可 */
    overflow-y: hidden;     /* 縦スクロールは完全に非表示 */
    flex-grow: 1;           /* 矢印ボタンに挟まれた隙間いっぱいに広がる */
    max-width: calc(100% - 68px); /* 矢印ボタンの領域を差し引いた最大幅 */
    white-space: nowrap;
    padding-bottom: 4px;    /* 下の線の余白を少し調整 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    scrollbar-width: none;  /* Firefox用 */
    -ms-overflow-style: none; /* IE/Edge用 */
}

.bookmark-tabs::-webkit-scrollbar {
    display: none;          /* Chrome, Safari用 */
}

.bookmark-tab-item {
    display: inline-block;  /* 要素をインラインブロック化 */
    flex-shrink: 0;         /* フレックスアイテムとして絶対に縮まないように設定 */
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.bookmark-tab-item.active, .bookmark-tab-item:hover {
    background: rgba(var(--p-rgb), 0.15);
    color: #fff;
    border-color: rgba(var(--p-rgb), 0.3);
}

/* ブックマークの編集モード */
.bookmark-card.edit-mode .bookmark-item {
    animation: wiggle 0.3s ease infinite alternate;
}

@keyframes wiggle {
    0% { transform: rotate(-1deg) translateY(0); }
    100% { transform: rotate(1deg) translateY(-1px); }
}

.bookmark-card.edit-mode .bookmark-delete-btn {
    display: grid !important;
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.bookmark-delete-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    border: none;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: none;
    place-items: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 10;
    transition: transform 0.2s;
}
.bookmark-delete-btn:hover {
    transform: scale(1.15);
    background: #dc2626;
}

.add-bookmark-btn {
    width: 100%;
    padding: 12px;
    border: 1px dashed var(--glass-border);
    background: rgba(255,255,255,0.02);
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s;
}

.add-bookmark-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: var(--p);
    color: #fff;
}

/* ToDo & メモ */
.utility-tabs {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 0;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    position: relative;
    font-family: inherit;
    transition: color 0.2s;
}

.tab-btn:hover, .tab-btn.active {
    color: #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--p);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ToDo リスト */
.todo-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.todo-input-wrapper input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}
.todo-input-wrapper input:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--p);
}

.todo-input-wrapper button {
    background: var(--p);
    border: none;
    color: #fff;
    width: 44px;
    border-radius: 10px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.todo-input-wrapper button:hover {
    background: rgba(var(--p-rgb), 0.8);
    transform: scale(1.05);
}

.todo-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 5px;
}

.todo-list::-webkit-scrollbar {
    width: 4px;
}
.todo-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.02);
    animation: todoPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes todoPop {
    from { opacity: 0; transform: scale(0.9) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.todo-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    cursor: pointer;
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid rgba(255,255,255,0.4);
    display: grid;
    place-items: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.todo-item.completed .todo-checkbox {
    background: var(--p);
    border-color: var(--p);
    transform: scale(1.05);
}

.todo-checkbox span {
    font-size: 14px;
    color: #fff;
    display: none;
}

.todo-item.completed .todo-checkbox span {
    display: block;
}

.todo-text {
    font-size: 0.95rem;
    transition: all 0.2s;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.todo-delete {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
}

.todo-item:hover .todo-delete {
    opacity: 1;
}

.todo-delete:hover {
    color: #ef4444;
}

/* クイックメモ */
textarea {
    width: 100%;
    height: 220px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    color: #fff;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
    line-height: 1.5;
    transition: all 0.3s;
}
textarea:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--p);
}

textarea::placeholder {
    color: rgba(255,255,255,0.4);
}

/* 設定サイドパネル */
.settings-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--glass-border);
    z-index: 2000;
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
    transition: right 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.settings-panel.active {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.settings-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.settings-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-body::-webkit-scrollbar {
    width: 6px;
}
.settings-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.settings-input {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.settings-input:focus {
    border-color: var(--p);
}

/* トグルスイッチスタイル */
.toggle-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.95rem;
}

/* ピッカー (カラー、フォント) */
.picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.color-dot:hover {
    transform: scale(1.1);
}

.color-dot.active {
    border-color: #fff;
    transform: scale(1.1);
}

.font-btn {
    padding: 8px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.82rem;
    background: rgba(255,255,255,0.05);
    color: #fff;
    transition: all 0.2s;
}

.font-btn:hover, .font-btn.active {
    background: var(--p);
    border-color: var(--p);
    transform: scale(1.03);
}

/* 背景ピッカーのグリッド */
.bg-selector-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.bg-option {
    aspect-ratio: 1;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    background-size: cover !important;
}

.bg-option:hover {
    transform: scale(1.1);
}

.bg-option.active {
    border-color: #fff;
    transform: scale(1.1);
}

.bg-img-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    display: grid;
    place-items: center;
}

.bg-img-option span {
    font-size: 20px;
}

.settings-help {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* グローバルアニメーション定義 */
.animate-fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-clock {
    animation: clockScale 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

@keyframes clockScale {
    from {
        opacity: 0;
        transform: scale(0.93) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
