/* style.css */

/* ==========================================
 * Infoページ（モダンカードデザイン）
 * ========================================== */
.info-page-bg {
    min-height: 100%;
    background: linear-gradient(180deg, #fef5ea, #fdebd1 60%, #ffe2b8);
    padding: 0 0 24px;
    overflow-x: hidden;
}

[data-theme="dark"] .info-page-bg {
    background: linear-gradient(180deg, #1a1a1a, #0e0e0e) !important;
}

/* ヒーローセクション */
.info-hero {
    text-align: center;
    padding: 32px 20px 24px;
    background: linear-gradient(135deg, rgba(255,153,0,0.15), rgba(255,179,71,0.05));
    margin-bottom: 8px;
    position: relative;
}

[data-theme="dark"] .info-hero {
    background: linear-gradient(135deg, rgba(255,153,0,0.12), rgba(255,179,71,0.02));
}

.info-hero-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 8px;
    display: inline-block;
    animation: heroFloat 3s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.info-hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 4px;
    background: linear-gradient(135deg, #FF9900, #FFB347);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #FF9900;
}

.info-hero-tagline {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 10px;
    line-height: 1.4;
}

[data-theme="dark"] .info-hero-tagline {
    color: #b8b8b8;
}

.info-hero-version {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(255, 153, 0, 0.15);
    color: #c97f00;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .info-hero-version {
    background: rgba(255, 179, 71, 0.2);
    color: #FFB347;
}

/* セクションブロック */
.info-section-block {
    background: rgba(255, 255, 255, 0.92);
    margin: 12px 14px;
    padding: 18px 16px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .info-section-block {
    background: rgba(45, 45, 45, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.info-block-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 153, 0, 0.15);
}

.info-block-icon {
    font-size: 22px;
    line-height: 1;
}

.info-block-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
}

[data-theme="dark"] .info-block-header h2 {
    color: #fff;
}

[data-theme="dark"] .info-block-header {
    border-bottom-color: rgba(255, 179, 71, 0.25);
}

/* 機能グリッド (2x2) */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.feature-card {
    text-align: center;
    padding: 14px 10px;
    background: linear-gradient(135deg, #fff8ec, #fff3d9);
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.feature-card:active { transform: scale(0.97); }

[data-theme="dark"] .feature-card {
    background: linear-gradient(135deg, #2a2418, #221d10);
}

.feature-emoji {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 6px;
}

.feature-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
}

[data-theme="dark"] .feature-title {
    color: #fff;
}

.feature-desc {
    font-size: 0.72rem;
    color: #888;
    line-height: 1.4;
}

[data-theme="dark"] .feature-desc {
    color: #aaa;
}

/* ステップリスト */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9900, #FFB347);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(255, 153, 0, 0.3);
}

.step-content {
    flex: 1;
    padding-top: 2px;
}

.step-title {
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

[data-theme="dark"] .step-title {
    color: #fff;
}

.step-desc {
    color: #666;
    font-size: 0.82rem;
    line-height: 1.5;
}

[data-theme="dark"] .step-desc {
    color: #b8b8b8;
}

/* Tipリスト */
.tip-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 4px;
    color: #444;
    font-size: 0.88rem;
    line-height: 1.5;
}

[data-theme="dark"] .tip-item {
    color: #ddd;
}

.tip-bullet {
    flex-shrink: 0;
    color: #FF9900;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.3;
}

/* シェアボタン */
.info-share-text {
    text-align: center;
    color: #777;
    font-size: 0.85rem;
    margin: 0 0 14px;
}

[data-theme="dark"] .info-share-text {
    color: #aaa;
}

.info-cta-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #FF9900, #FFB347);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 153, 0, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.info-cta-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.25);
}

/* その他のアプリ */
.info-other-apps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.other-app-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.other-app-card:active {
    transform: scale(0.98);
    background: rgba(255, 153, 0, 0.04);
}

.other-app-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 153, 0, 0.25);
}

[data-theme="dark"] .other-app-card {
    background: var(--bg-card, #2d2d2d);
    border-color: var(--border-medium, rgba(255,255,255,0.1));
}

.other-app-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.other-app-icon-text {
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.other-app-info {
    flex: 1;
    min-width: 0;
}

.other-app-name {
    font-weight: 700;
    font-size: 0.93rem;
    color: #333;
    margin-bottom: 2px;
}

[data-theme="dark"] .other-app-name {
    color: #fff;
}

.other-app-desc {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.4;
}

[data-theme="dark"] .other-app-desc {
    color: #aaa;
}

.other-app-arrow {
    flex-shrink: 0;
    color: #ccc;
    font-size: 22px;
    font-weight: 300;
}

[data-theme="dark"] .other-app-arrow {
    color: #666;
}

/* ストアリンク */
.info-store-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .info-store-links {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.info-store-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    color: #FF9900;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.info-store-link:hover {
    text-decoration: underline;
}

[data-theme="dark"] .info-store-link {
    color: #FFB347;
}

/* メタリスト（運営情報） */
.info-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.info-meta-row:last-child {
    border-bottom: none;
}

[data-theme="dark"] .info-meta-row {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.info-meta-label {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

[data-theme="dark"] .info-meta-label {
    color: #aaa;
}

.info-meta-value {
    color: #333;
    font-size: 0.88rem;
    font-weight: 600;
}

[data-theme="dark"] .info-meta-value {
    color: #fff;
}

.info-meta-link {
    color: #FF9900;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.info-meta-link::after {
    content: '›';
    font-size: 1.1em;
    line-height: 1;
}

.info-meta-link:hover {
    text-decoration: underline;
}

[data-theme="dark"] .info-meta-link {
    color: #FFB347;
}

/* 商標表記 */
.info-trademark {
    margin: 16px 14px 0;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

[data-theme="dark"] .info-trademark {
    background: rgba(0, 0, 0, 0.3);
}

.info-trademark p {
    margin: 0 0 6px;
    color: #888;
    font-size: 0.7rem;
    line-height: 1.5;
    text-align: center;
}

.info-trademark p:last-child {
    margin-bottom: 0;
}

[data-theme="dark"] .info-trademark p {
    color: #888;
}

.info-bottom-spacer {
    height: 80px;
}

/* ==========================================
 * テーマ変数（ライト・ダーク両対応）
 * ========================================== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #fafafa;
    --bg-card: #ffffff;
    --bg-overlay: rgba(255, 255, 255, 0.98);

    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-link: #007bff;

    --border-light: rgba(0, 0, 0, 0.06);
    --border-medium: rgba(0, 0, 0, 0.12);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 -2px 8px rgba(0, 0, 0, 0.04);

    --accent-amazon: #FF9900;
    --accent-amazon-light: #FFB347;
    --accent-rakuten: #f89494;
    --accent-yahoo: #FFD6E5;

    --todo-title-bg: #04945d;
    --done-title-bg: #c79b49;
    --todo-area-bg: #edffe5;
    --done-area-bg: #fff3e3;

    --btn-edit: #4a90e2;
    --btn-check: #06b34c;
    --btn-delete: #ff6565;

    --tab-active: #FF9900;
    --tab-inactive: #888;
}

/* ダークモード */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2a2a2a;
    --bg-card: #2d2d2d;
    --bg-overlay: rgba(30, 30, 30, 0.98);

    --text-primary: #e8e8e8;
    --text-secondary: #b8b8b8;
    --text-muted: #888888;
    --text-link: #5dade2;

    --border-light: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.16);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 -2px 8px rgba(0, 0, 0, 0.3);

    --todo-title-bg: #036a44;
    --done-title-bg: #8c6d33;
    --todo-area-bg: #1f2e1c;
    --done-area-bg: #2e2820;
}

/* ダークモード時の主要要素の背景・文字色を上書き */
[data-theme="dark"] body,
[data-theme="dark"] ons-page,
[data-theme="dark"] .page,
[data-theme="dark"] ons-tabbar .tabbar,
[data-theme="dark"] ons-toolbar {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .toolbar__center,
[data-theme="dark"] .toolbar__title {
    color: var(--accent-amazon) !important;
}

[data-theme="dark"] .box__list li {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .box__list li ons-button[modifier="quiet"],
[data-theme="dark"] .box__list li .button--quiet {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .item-area-incomplete { background: var(--todo-area-bg) !important; }
[data-theme="dark"] .item-area-complete { background: var(--done-area-bg) !important; }
[data-theme="dark"] .todo-title { background: var(--todo-title-bg) !important; }
[data-theme="dark"] .done-title { background: var(--done-title-bg) !important; }

/* ダークモード時のメインページ背景（黄色グラデーションを暗色に） */
[data-theme="dark"] .page__background_ToDo,
[data-theme="dark"] .page__background_ToDo2 {
    background: linear-gradient(180deg, #1a1a1a, #0e0e0e) !important;
}

/* ダークモード時の検索ページ背景アニメーション（明るい黄色を暗色に） */
[data-theme="dark"] .page__background {
    background: #1a1a1a !important;
}
[data-theme="dark"] .first {
    background: linear-gradient(#3a1c00, #2a1a08) !important;
}
[data-theme="dark"] .second {
    background: linear-gradient(#2a2300, #1f1a08) !important;
}
[data-theme="dark"] .third {
    background: linear-gradient(#1a1a1a, #0e0e0e) !important;
}

/* ダークモード時のbody/contentエリア */
[data-theme="dark"] body {
    background: var(--bg-primary) !important;
}

[data-theme="dark"] .content {
    background: transparent !important;
}

/* cmark（商標表記）の文字色 */
[data-theme="dark"] .cmark,
[data-theme="dark"] .cmark p {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* タイトル文字色 */
[data-theme="dark"] .toolbar__center,
[data-theme="dark"] .toolbar__title,
[data-theme="dark"] ons-toolbar .center {
    color: var(--accent-amazon-light) !important;
}

/* ツールバー背景 */
[data-theme="dark"] ons-toolbar,
[data-theme="dark"] .toolbar {
    background: var(--bg-secondary) !important;
    border-bottom-color: var(--border-light) !important;
}

[data-theme="dark"] .search-option-item label,
[data-theme="dark"] .search-option-button {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] textarea,
[data-theme="dark"] ons-select,
[data-theme="dark"] ons-select select,
[data-theme="dark"] ons-select .select-input,
[data-theme="dark"] .ons-select-inner,
[data-theme="dark"] .select,
[data-theme="dark"] .select-input,
[data-theme="dark"] select.select-input {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-medium) !important;
}

/* select の中の option 要素も */
[data-theme="dark"] ons-select option,
[data-theme="dark"] select option {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* 検索オプションの展開エリア（accordion-open） */
[data-theme="dark"] #amazon-options,
[data-theme="dark"] #amazon-options-second,
[data-theme="dark"] #rakuten-options,
[data-theme="dark"] #rakuten-options-second,
[data-theme="dark"] #yahoo-options,
[data-theme="dark"] #yahoo-options-second {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] #amazon-options *,
[data-theme="dark"] #amazon-options-second *,
[data-theme="dark"] #rakuten-options *,
[data-theme="dark"] #rakuten-options-second *,
[data-theme="dark"] #yahoo-options *,
[data-theme="dark"] #yahoo-options-second * {
    color: var(--text-primary);
}

/* ons-list / ons-list-item の暗色化 */
[data-theme="dark"] ons-list,
[data-theme="dark"] .list,
[data-theme="dark"] ons-list-item,
[data-theme="dark"] .list-item {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-light) !important;
}

[data-theme="dark"] ons-list-item .center,
[data-theme="dark"] ons-list-item .right,
[data-theme="dark"] ons-list-item .left {
    color: var(--text-primary) !important;
}

/* ons-switch の枠 */
[data-theme="dark"] ons-switch .switch__toggle,
[data-theme="dark"] .switch__toggle {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .cmark p,
[data-theme="dark"] .cmark {
    color: var(--text-muted) !important;
}

[data-theme="dark"] #js-add-form,
[data-theme="dark"] #js-add-form-second {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .info-section {
    background: var(--bg-card) !important;
}

[data-theme="dark"] .info-row {
    border-color: var(--border-light) !important;
}

[data-theme="dark"] .app-recommend {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .guide-section {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .guide-section h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .guide-image,
[data-theme="dark"] .guide-option {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* ==========================================
 * ドラッグハンドル
 * ========================================== */
.drag-handle {
    flex-shrink: 0;
    width: 28px;
    height: 32px;
    padding: 0;
    margin-right: 4px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #999;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.drag-handle:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #555;
}

.drag-handle:active {
    cursor: grabbing;
    background: rgba(255, 153, 0, 0.15);
    color: #FF9900;
}

[data-theme="dark"] .drag-handle {
    color: #888;
}

[data-theme="dark"] .drag-handle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
}

li.dragging {
    background: var(--bg-card, #fff) !important;
    border-radius: 12px !important;
}

[data-theme="dark"] li.dragging {
    background: #3d3d3d !important;
}

.drag-placeholder {
    transition: height 0.2s ease;
}

/* ==========================================
 * テンプレートピッカー
 * ========================================== */
.template-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.25s ease-out;
    transition: opacity 0.25s ease;
}

.template-picker {
    background: var(--bg-primary, #fff);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: slideUpFromBottom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.25);
}

@keyframes slideUpFromBottom {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.template-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light, rgba(0,0,0,0.08));
}

.template-picker-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary, #333);
}

.template-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: #555;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .template-close {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.template-picker-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    -webkit-overflow-scrolling: touch;
}

.template-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin: 8px 0;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-light, rgba(0,0,0,0.08));
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.template-card:active {
    transform: scale(0.98);
    background: rgba(255, 153, 0, 0.06);
}

.template-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 153, 0, 0.3);
}

[data-theme="dark"] .template-card {
    background: var(--bg-card, #2d2d2d);
    border-color: var(--border-medium, rgba(255,255,255,0.12));
    color: var(--text-primary, #e8e8e8);
}

.template-emoji {
    font-size: 36px;
    line-height: 1;
    flex-shrink: 0;
}

.template-info {
    flex: 1;
    min-width: 0;
}

.template-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary, #333);
    margin-bottom: 3px;
}

[data-theme="dark"] .template-title { color: #fff; }

.template-desc {
    font-size: 0.78rem;
    color: var(--text-secondary, #888);
    line-height: 1.4;
    margin-bottom: 4px;
}

.template-count {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 153, 0, 0.15);
    color: #c97f00;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.template-picker-footer {
    padding: 10px 16px 14px;
    text-align: center;
    color: var(--text-muted, #999);
    font-size: 0.78rem;
    border-top: 1px solid var(--border-light, rgba(0,0,0,0.08));
}

/* テンプレート追加ボタン（リストヘッダー左側） */
.template-add-btn {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.template-add-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.template-add-btn:active {
    transform: translateY(-50%) scale(0.9);
}

/* ==========================================
 * アプリ内お知らせバナー
 * ========================================== */
.announcement-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 12px;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.08));
    animation: announceSlideIn 0.4s ease-out;
    position: relative;
}

.announcement-feature {
    background: linear-gradient(135deg, #fff8e7, #fff3d6);
    border-left: 4px solid #FF9900;
}

.announcement-sale {
    background: linear-gradient(135deg, #ffeae5, #ffd8d0);
    border-left: 4px solid #ff6565;
}

.announcement-info {
    background: linear-gradient(135deg, #e7f3ff, #d6e8ff);
    border-left: 4px solid #4A90E2;
}

[data-theme="dark"] .announcement-feature {
    background: linear-gradient(135deg, #3d2f00, #2a2000);
    border-left-color: #FFB347;
    color: #fff;
}

[data-theme="dark"] .announcement-sale {
    background: linear-gradient(135deg, #3d1c1c, #2a1010);
    border-left-color: #ff8585;
    color: #fff;
}

[data-theme="dark"] .announcement-info {
    background: linear-gradient(135deg, #1c2a3d, #10202a);
    border-left-color: #6ba9e8;
    color: #fff;
}

.announcement-content {
    flex: 1;
    min-width: 0;
}

.announcement-title {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 4px;
    color: #333;
}

[data-theme="dark"] .announcement-title { color: #fff; }

.announcement-message {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #555;
}

[data-theme="dark"] .announcement-message { color: #ccc; }

.announcement-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: background 0.2s ease;
}

.announcement-close:hover {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .announcement-close {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

@keyframes announceSlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
 * オンボーディング（初回起動時のスライド）
 * ========================================== */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: #fff;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.onboarding-slides {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.onboarding-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px 30px;
    text-align: center;
    color: #fff;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.onboarding-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.onboarding-icon {
    font-size: 90px;
    line-height: 1;
    margin-bottom: 32px;
    animation: onboardingIconBounce 0.6s ease-out;
}

@keyframes onboardingIconBounce {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.onboarding-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 18px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.onboarding-desc {
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    opacity: 0.95;
}

.onboarding-controls {
    padding: 24px 24px 32px;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.onboarding-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, transform 0.2s ease;
}

.onboarding-dot.active {
    background: #FF9900;
    transform: scale(1.3);
}

.onboarding-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.onboarding-skip {
    padding: 10px 18px;
    background: transparent;
    border: none;
    color: #999;
    font-size: 0.95rem;
    cursor: pointer;
}

.onboarding-next {
    padding: 12px 32px;
    background: linear-gradient(135deg, #FF9900, #FFB347);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
    transition: transform 0.15s ease;
}

.onboarding-next:active {
    transform: scale(0.96);
}

/* ==========================================
 * カスタム Toast 通知
 * ========================================== */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%) translateY(0);
    z-index: 200000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: rgba(40, 40, 40, 0.95);
    color: #fff;
    border-radius: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    font-size: 0.92rem;
    font-weight: 600;
    max-width: 88%;
    pointer-events: none;
    animation: appToastIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-toast--success {
    background: linear-gradient(135deg, #06b34c, #00a045);
}

.app-toast--error {
    background: linear-gradient(135deg, #ff6565, #e84545);
}

.app-toast--hide {
    animation: appToastOut 0.28s ease-in forwards;
}

.app-toast-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.app-toast-text {
    line-height: 1.3;
}

@keyframes appToastIn {
    0% { transform: translateX(-50%) translateY(20px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes appToastOut {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(20px); opacity: 0; }
}

/* SNS共有モーダル（フォールバック用） */
.share-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.share-modal {
    background: var(--bg-card, #fff);
    border-radius: 16px;
    padding: 24px;
    max-width: 320px;
    width: 86%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.share-modal h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: var(--text-primary, #333);
}

.share-modal-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary, #777);
    text-align: center;
    margin-bottom: 18px;
    padding: 0 4px;
}

[data-theme="dark"] .share-modal-desc {
    color: var(--text-secondary, #aaa);
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.share-btn:active { transform: scale(0.97); opacity: 0.9; }
.share-x      { background: #000; }
.share-line   { background: #06C755; }
.share-fb     { background: #1877F2; }
.share-copy   { background: #555; }

.share-close {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-medium, rgba(0,0,0,0.12));
    border-radius: 8px;
    color: var(--text-secondary, #666);
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ダークモードトグルボタン（ツールバー内 = 通常配置） */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-primary, #333);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, background 0.25s ease;
    margin: 0;
    padding: 0;
}

/* ツールバーの.right内に配置されたとき、右端に押し出す */
ons-toolbar .right .theme-toggle-btn,
.toolbar__right .theme-toggle-btn {
    margin-right: 8px;
    margin-left: auto;
}

.theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: scale(1.08);
}

.theme-toggle-btn:active {
    transform: scale(0.92);
}

[data-theme="dark"] .theme-toggle-btn {
    color: var(--accent-amazon);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* グローバルリセット */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: "Helvetica Neue",
    Arial,
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    Meiryo,
    sans-serif;
  text-align: center;
}

.content {
  text-align: center;
  font-size: larger;
  font-weight: bolder;
}

.faqField {visibility:hidden;}

.card {
  background-color:rgba(255,255,255,0.7);
}

i {font-size:x-large;}

img {
  max-width: 98%;
  border-radius: 8px;
}

.ResultView > .card > h2,.Points{
  text-align: center;
}

#Kyokan{
  text-align: center;
  padding-bottom: 1vh;
}

.up-button{
  width:32vw;
  height:32vw;
  border-radius: 36px;
}
.fa-thumbs-down, .fa-thumbs-up, .fa-theater-masks, .fa-chevron-down, .fa-arrow-right, .fa-id-badge{
  font-size:xx-large;
}
.font-large{font-size:x-large !important;}

.toggleiconcss{
  color:red !important;
}
.toggleMusicIconCss{
  color:yellowgreen !important;
  text-shadow: 1px 1px 2px #ccc !important;
}
.Points{
  font-size: xx-large;
  font-weight: 900;
}

/* ツールバー */
.toolbar{
  background: linear-gradient(45deg, #fff, #999);
  text-shadow: 2px 2px 3px #ccc !important;
}
.toolbar__left,.toolbar__center,.toolbar__title,.back-button__icon{
  font-weight: bolder !important;
  color: #f7941d !important;
  fill: #f7941d !important;
  font-size: x-large !important;
  text-shadow: 2px 2px 3px #333 !important;
}
.toolbar__right, .toolbar-button{
  font-weight: bold;
  padding-right: 3vw;
  font-size:x-large;
  text-shadow: 1px 1px 2px #ccc !important;
  color:#000;
}
#push-button, #answer {
  font-weight: bold;
  line-height:1.5em;
  text-shadow: 1px 1px 2px #000;
  background-color: #FAA691;
  background: -webkit-linear-gradient(-45deg,  #e70050, #0a4088);
  background: linear-gradient(-45deg,  #e70050, #0a4088);
  font-size:1.4em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5),
   inset 0 1px rgba(255,255,255,0.3),
    inset 0 -1px rgba(255,255,255,0.2),
     inset 0 10px 20px rgba(255,255,255,0.25),
      inset 0 -15px 30px rgba(0,0,0,0.3);
  border-radius:8px;
}

.page__content h2{
    background:rgba(0, 0, 0, 0) linear-gradient(transparent 50%, #FFDFEF 0%) repeat scroll 0 0;
    transition: all 2s ease;
    font-size: x-large;
    font-weight: 900;
    text-shadow: 1px 1px 2px #fff !important;
    display: inline;
}

/* ダークモード時はピンクハイライト＋白シャドウを暗色用に変更 */
[data-theme="dark"] .page__content h2 {
    background: rgba(0, 0, 0, 0) linear-gradient(transparent 50%, rgba(255, 153, 0, 0.25) 0%) repeat scroll 0 0 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
}

/* infoページ内ではピンクハイライトを廃止して、シンプルな白文字に */
[data-theme="dark"] #info .page__content h2,
[data-theme="dark"] .info-section-block h2 {
    background: transparent !important;
    text-shadow: none !important;
    color: #fff !important;
    display: block;
}

/* ライトモードでもinfoページの新デザインでは下線ハイライトを廃止 */
#info .info-section-block h2 {
    background: transparent !important;
    text-shadow: none !important;
    display: block !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
}

 .page__content h3{
  padding: 0.5em 0 0 0;
  margin: 0.5em 0 0 0;
  border-top: double 2px orange;
  font-size: larger;
  font-weight: 600;
 }
 h4{
  padding: 0.5em 0;
  margin: 0.5em 0;
  border-top: ridge 2px #364e96;
  border-bottom: ridge 2px #364e96;
  font-size: larger;
  font-weight: 600;
 }
#share_div{
  width:100%;
}
.tw_btn {
  width:32px;
  height: 32px;
  position: relative;
  display: inline-block;
  padding: 0.1em;
  text-decoration: none;
  color: #fff;
  background: #55acee;
  border-radius: 32px;
  filter: drop-shadow(0 0px 3px rgba(0, 0, 0, .9));
  font-weight: bold;
}

.tw_btn:active {
  border-bottom: solid 2px #55acee;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.30);
}

.fb_btn {
  width:32px;
  height: 32px;
  position: relative;
  display: inline-block;
  padding: 0.1em;
  text-decoration: none;
  color: #fff;
  background: #3c5b99;
  border-radius: 32px;
  filter: drop-shadow(0 0px 3px rgba(0, 0, 0, .9));
  font-weight: bold;
}

.fb_btn:active {
  border-bottom: solid 2px #3c5b99;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.30);
}

.line_btn {
  width:32px;
  height: 32px;
  position: relative;
  display: inline-block;
  padding: 0.1em;
  text-decoration: none;
  color: #fff;
  background: #00c739;
  border-bottom: solid 2px #00c739;
  border-radius: 32px;
  filter: drop-shadow(0 0px 3px rgba(0, 0, 0, .9));
  font-weight: bold;
}

.line_btn:active {
  border-bottom: solid 2px #00c739;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.30);
}

.clip_btn {
  margin: auto !important;
  padding-left:auto !important;
  width:32px;
  height: 32px;
  position: relative;
  display: inline-block;
  padding: 0.1em;
  text-decoration: none;
  color: #fff;
  background: #C79C00;
  border-radius: 32px;
  filter: drop-shadow(0 0px 3px rgba(0, 0, 0, .9));
  font-weight: bold;
}

.clip_btn:active {
  border-bottom: solid 2px #C79C00;
  filter: drop-shadow(0 0px 3px rgba(0, 0, 0, .9));
}

hr{
  border: solid 1px rgb(212, 0, 255);
}
.result_hr{
  border: double 2px orange;
}

#shareSpace{
  margin-bottom:0px;
}

#cateSelector{
  padding-bottom: 1em;
}

/* カテゴリー選択（#cateSelector-top / #cateSelector / #cateSelector2 に
   createCategriesOfCuntries() が ons-select を差し込む）。
   #page-index 配下だけは all.css の .inputs .category が効くので、
   ここでは Todo1 / Todo2 タブでも国選択(.country)と同じ見た目になるようにする。 */
.cateSelector{
  text-align: center;
}
.cateSelector .category{
  width: 80%;
  background-color: rgba(255,255,255,0.9);
  border-radius: 6px;
  margin-bottom: 1vh;
}

/* CSS Mood Lighting (検索ページ背景アニメーション) */
    .page__background,
    .first,
    .second,
    .third {
      height: 100vh;
      width: 100vw;
    }
    .first,
    .second,
    .third {
      position: absolute;
    }
    .second,
    .third {
      opacity: 0;
    }
    .page__background {
      height: 100vh;
      position: relative;
      z-index: 1;
    }
    .first {
      animation: first 20s infinite;
      background: linear-gradient(#CA5009,#fab767);
      z-index: 10;
    }
      @keyframes first {
        0% {opacity: 1.0;}
        10% {opacity: 0.8;}
        20% {opacity: 0.6;}
        30% {opacity: 0.4;}
        40% {opacity: 0.2;}
        50% {opacity: 0.1;}
        60% {opacity: 0.2;}
        70% {opacity: 0.4;}
        80% {opacity: 0.6;}
        90% {opacity: 0.8;}
        100% {opacity: 1.0;}
      }

    .second {
      animation: second 20s infinite; animation-delay: 2s;
      background:linear-gradient(#EED23B, #EAC391);
      z-index: 20;
    }
      @keyframes second {
        0% {opacity: 0;}
        10% {opacity: 0.2;}
        20% {opacity: 0.4;}
        30% {opacity: 0.6;}
        40% {opacity: 0.8;}
        50% {opacity: 1.0;}
        60% {opacity: 0.8;}
        70% {opacity: 0.6;}
        80% {opacity: 0.4;}
        90% {opacity: 0.2;}
        100% {opacity: 0;}
      }

    .third {
      animation: third 20s infinite;
      animation-delay: 8s;
      background: linear-gradient(#FCE0BE, #d07400);
      z-index: 30;
    }
      @keyframes third {
        0% {opacity: 0;}
        10% {opacity: 0.2;}
        20% {opacity: 0.4;}
        30% {opacity: 0.6;}
        40% {opacity: 0.8;}
        50% {opacity: 1.0;}
        60% {opacity: 0.8;}
        70% {opacity: 0.6;}
        80% {opacity: 0.4;}
        90% {opacity: 0.2;}
        100% {opacity: 0;}
      }

    .page__content {
      z-index: 1000;
    }
    h1 {
      font-size: 40px;
      font-weight: 400;
    }
    p {
      text-shadow: 1px 1px 1px #ccc;
    }

#btnCul{
  background-color: #1D7FF7;
  background: -webkit-linear-gradient(-135deg, #1D7FF7,  rgb(55,154,255) 20%);
  border: 1px solid #4343cc;
  text-shadow: 1px 1px 2px #000;
  font-weight: bold;
  font-size:1.4em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3);
  border-radius:8px;
  margin:0.5em;
}

#adFromWeb{
  display: none;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3);
}
#adFromWebUs{
  display: none;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3);
}
#adFromWeb3{
  width: 90%;
  padding: 0px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.1));
}

.introjs-fixParent{z-index:9999999 !important}

.introjs-button {
    border-radius: 8px;
    background-color: #fff;
}
.modal{
    background-color: rgba(0, 0, 0, 0.1);
}
.list-item--material:first-child{
    background-color: lemonchiffon;
}

/* 入力・ボタン基本スタイル */
input {
    border: none;
    border-radius: 8px;
    padding: 5px 10px;
    outline: none;
}

button {
    border-radius: 8px;
    border: none;
    padding: 5px 10px;
    margin-left: 5px;
    background: #ff6565;
    color: #fff;
    cursor: pointer;
}

li, ons-list-item {
    display: flex;
    align-items: center;
    border-bottom: 1px dotted #bbb;
}

li p, ons-list-item p, button--quiet {
    margin: 0;
    flex: 0 1 820px;
    font-size: xx-large;
}

/* Todoリスト共通スタイル */
.add-item-area {
    background: #e7e7e7;
    padding: 10px;
    margin: 20px 0;
    border-radius: 10px;
}

.item-area-incomplete {
    background: #edffe5;
    padding: 10px;
    margin: 0;
    border-radius: 10px 10px 0 0;
    min-height: 200px;
}

.item-area-incomplete .btn-box button {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-area-complete {
    background: #fff3e3;
    padding: 10px;
    margin: 0;
    border-radius: 10px 10px 0 0;
    min-height: 200px;
}

.item-area-complete .btn-box button {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.todo-title, .done-title {
    color: #FFFFFF;
    font-weight: bold;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0px;
    padding: 5px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 買い物リストタイトル右の操作トグルボタン */
.todo-title .actions-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.todo-title .actions-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.todo-title .actions-toggle-btn:active {
    background: rgba(255, 255, 255, 0.5);
}

/* 操作モード時はボタンを縦ドット風に回転＋色変化で状態を視覚化 */
.box__list.actions-visible ~ .todo-title .actions-toggle-btn,
.todo-box:has(.box__list.actions-visible) .actions-toggle-btn {
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%) rotate(90deg);
}

.todo-title {
    background: #04945d;
}

.done-title {
    background: #c79b49;
}

#js-allremove-btn {
    color: #FFFFFF;
    font-weight: bold;
    border-radius: 4px;
    padding: 5px 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#js-allremove-btn:hover {
    background-color: #D32F2F;
}

.checkedBtn {
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    background: #04945d;
    border: none;
    font-size: 14px;
}

.xmarkedBtn {
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    background: #c79b49;
    border: none;
    font-size: 14px;
}

.editBtn {
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    background: #4a90e2;
    border: none;
    font-size: 14px;
}

.delBtn {
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    background: #ff6565;
    border: none;
    font-size: 14px;
}

#js-register-btn {
    color: #fff;
    font-weight: bold;
    border-radius: 16px;
    background: #ff6565;
    padding: 10px;
    line-height: 24px;
}

.mainToDo {
  padding: 5px;
  overflow-x: hidden;
}

.register-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px;
}

.register-box > input {
  width: 70%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.register-box > button {
  width: 25%;
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
/* .btn-box は .box__list li 内で定義済み */
.button--quiet{
    color: #000;
    text-shadow: #ccc;
    line-height: 40px;
    margin-left: 3vw;
    font-size: larger;
    font-weight: 500;
}
.rightToDo{
    margin-right: 5vw;
}

/* Todo1/Todo2 背景 */
.page__background_ToDo, .page__background_ToDo2 {
  height: -webkit-fill-available;
  background: linear-gradient(90deg, #fef5ea, #fab767);
  transition: background 0.3s ease;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

#amaraku {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.box__list {
    padding: 5px;
}

.box__list li {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin-bottom: 6px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    gap: 4px;
}

.box__list li .button--quiet,
.box__list li ons-button[modifier="quiet"] {
    flex: 1;
    min-width: 0;
    word-break: break-word !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow: visible !important;
    text-align: left;
    line-height: 1.4;
    margin-left: 0;
    /* 通常時: 操作ボタンが非表示なのでフル幅 */
    max-width: 100%;
}

/* 操作モード時はボタン3つ分の幅を確保 */
.box__list.actions-visible li .button--quiet,
.box__list.actions-visible li ons-button[modifier="quiet"] {
    max-width: calc(100% - 130px);
}

/* btn-box は常時flex描画。通常時は右にスライドして隠す
 * tutorial.css の #js-todo-list li .btn-box (ID付き) より specificity を高めるため
 * #js-todo-list li.box__list, #js-done-list li.box__list ... では無理なので、
 * !important で確実に上書きする */
#js-todo-list li .btn-box,
#js-done-list li .btn-box,
#js-todo-list-second li .btn-box,
#js-done-list-second li .btn-box {
    display: flex;
    flex-shrink: 0;
    gap: 4px;
    align-items: center;
    margin-left: auto;
    overflow: hidden;
    /* 通常時: 幅0・透明・右に60pxずれて非表示（しっかりスライドする距離） */
    max-width: 0 !important;
    opacity: 0 !important;
    transform: translateX(60px) !important;
    pointer-events: none;
    /* ease-out で視覚的にしっかりスライドを感じさせる */
    transition: max-width 0.4s ease-out,
                opacity 0.4s ease-out,
                transform 0.4s ease-out !important;
    will-change: transform, max-width, opacity;
}

/* 操作モード時: 幅展開・不透明・元位置へスライドイン */
#js-todo-list.actions-visible li .btn-box,
#js-done-list.actions-visible li .btn-box,
#js-todo-list-second.actions-visible li .btn-box,
#js-done-list-second.actions-visible li .btn-box {
    max-width: 200px !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
    pointer-events: auto;
}

/* アイテムごとに段階的に出現（順番にスライドイン）。1番目もわずかに遅延を入れて確実に発火 */
#js-todo-list.actions-visible li:nth-child(1) .btn-box,
#js-done-list.actions-visible li:nth-child(1) .btn-box,
#js-todo-list-second.actions-visible li:nth-child(1) .btn-box,
#js-done-list-second.actions-visible li:nth-child(1) .btn-box { transition-delay: 0.02s !important; }
#js-todo-list.actions-visible li:nth-child(2) .btn-box,
#js-done-list.actions-visible li:nth-child(2) .btn-box,
#js-todo-list-second.actions-visible li:nth-child(2) .btn-box,
#js-done-list-second.actions-visible li:nth-child(2) .btn-box { transition-delay: 0.08s !important; }
#js-todo-list.actions-visible li:nth-child(3) .btn-box,
#js-done-list.actions-visible li:nth-child(3) .btn-box,
#js-todo-list-second.actions-visible li:nth-child(3) .btn-box,
#js-done-list-second.actions-visible li:nth-child(3) .btn-box { transition-delay: 0.14s !important; }
#js-todo-list.actions-visible li:nth-child(4) .btn-box,
#js-done-list.actions-visible li:nth-child(4) .btn-box,
#js-todo-list-second.actions-visible li:nth-child(4) .btn-box,
#js-done-list-second.actions-visible li:nth-child(4) .btn-box { transition-delay: 0.20s !important; }
#js-todo-list.actions-visible li:nth-child(5) .btn-box,
#js-done-list.actions-visible li:nth-child(5) .btn-box,
#js-todo-list-second.actions-visible li:nth-child(5) .btn-box,
#js-done-list-second.actions-visible li:nth-child(5) .btn-box { transition-delay: 0.26s !important; }
#js-todo-list.actions-visible li:nth-child(n+6) .btn-box,
#js-done-list.actions-visible li:nth-child(n+6) .btn-box,
#js-todo-list-second.actions-visible li:nth-child(n+6) .btn-box,
#js-done-list-second.actions-visible li:nth-child(n+6) .btn-box { transition-delay: 0.32s !important; }

/* キーワードの幅変化もアニメーション */
.box__list li .button--quiet,
.box__list li ons-button[modifier="quiet"] {
    transition: max-width 0.4s ease-out;
}

/* moreBtn は削除（買い物リストタイトル右のactions-toggle-btnへ統合） */

.output-flex {
    padding: 5px;
}

/* ==========================================
 * 検索時刻バッジ（相対時間表示）
 * ========================================== */
.timestamp-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(255, 153, 0, 0.12);
    color: #c97f00;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.4;
    vertical-align: middle;
    white-space: nowrap;
    pointer-events: none;
}

/* 完了済みアイテムでは緑系の色 */
.box__list .done-item .timestamp-badge {
    background: rgba(199, 155, 73, 0.15);
    color: #c79b49;
}

/* ==========================================
 * 空リスト時のプレースホルダー
 * ========================================== */
.box__list:empty {
    position: relative;
    min-height: 120px;
}

.box__list.item-area-incomplete:empty::before {
    content: "🛒";
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 36px;
    opacity: 0.5;
}

/* 文言はCSSに直書きせず <ul data-i18n="[data-empty-text]todo.emptyList"> から取る。
   直書きだと翻訳できず、英語UIでも日本語が出てしまうため。
   （プレースホルダは :empty で出しているので、中に要素を置くことはできない） */
.box__list.item-area-incomplete:empty::after {
    content: attr(data-empty-text);
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    line-height: 1.5;
}

.box__list.item-area-complete:empty::before {
    content: "✓";
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 36px;
    opacity: 0.4;
    color: #c79b49;
}

/* 同上。文言は <ul data-i18n="[data-empty-text]todo.emptyDone"> から取る */
.box__list.item-area-complete:empty::after {
    content: attr(data-empty-text);
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    text-align: center;
    color: #b08a3f;
    font-size: 0.85rem;
}

/* ==========================================
 * 新規アイテム登録時のミニアニメーション
 * ========================================== */
@keyframes itemRegister {
    0% {
        transform: translateY(-12px) scale(0.95);
        opacity: 0;
        background: #FFF3D9;
    }
    50% {
        transform: translateY(0) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        background: #fff;
    }
}

.box__list li.just-registered {
    animation: itemRegister 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* 削除時のフェードアウト */
@keyframes itemRemove {
    0% { transform: translateX(0) scale(1); opacity: 1; max-height: 80px; }
    100% { transform: translateX(-30px) scale(0.95); opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin: 0; }
}

.box__list li.removing {
    animation: itemRemove 0.3s ease-in forwards;
    overflow: hidden;
}

/* ==========================================
 * タブバーのアクティブインジケーター強化
 * ========================================== */
ons-tabbar .tabbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

/* アクティブタブの強調 */
ons-tab.tabbar--top__item--active,
ons-tab[active],
ons-tab.active {
    color: #FF9900 !important;
    position: relative;
}

/* アクティブタブの下線インジケーター */
ons-tab.tabbar--top__item--active::after,
ons-tab[active]::after,
ons-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    background: linear-gradient(90deg, #FF9900, #FFB347);
    border-radius: 3px 3px 0 0;
    animation: tabIndicatorPulse 0.3s ease-out;
}

@keyframes tabIndicatorPulse {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }
    100% {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* タブアイコン・ラベルにアクティブ時のスケールアニメーション */
ons-tab .tabbar__icon,
ons-tab .tabbar__label {
    transition: transform 0.2s ease-out, color 0.2s ease-out;
}

ons-tab.tabbar--top__item--active .tabbar__icon,
ons-tab[active] .tabbar__icon,
ons-tab.active .tabbar__icon {
    transform: scale(1.15);
    color: #FF9900;
}

ons-tab.tabbar--top__item--active .tabbar__label,
ons-tab[active] .tabbar__label,
ons-tab.active .tabbar__label {
    color: #FF9900;
    font-weight: 700;
}

/* Todo2固有スタイル */
#js-allremove-btn-second {
    color: #fff;
    font-weight: bold;
    border-radius: 0 0 10px 10px;
    margin-bottom: 0px;
    background: #6e6e6e;
    padding: 10px;
}

#js-register-btn-second {
    color: #fff;
    font-weight: bold;
    border-radius: 16px;
    background: #ff6565;
    padding: 10px;
    line-height: 24px;
}

#amaraku-second {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

#todo2 #AmaOnlyToDo-second {
    clear: both;
    padding-left: 5vw;
    max-width: 87vw;
}

#todo2 #adFromWeb3-second {
    width: 90%;
    padding: 0px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.1));
}

#todo2 #amaraku-second {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

#todo2 .todo-box,
#todo2 .done-box {
    margin-bottom: 0px;
}

#todo2 .todo-title { background: #04945d; }
#todo2 .done-title { background: #c79b49; }

#todo2 .item-area-incomplete { background: #edffe5; }
#todo2 .item-area-complete { background: #fff3e3; }

/* 検索オプションボタン */
.search-option-group {
  display: flex;
  justify-content: space-around;
  margin: 10px 0;
}

.search-option-item {
  flex: 1;
  margin: 0 5px;
}

.search-option-button {
  display: block;
  padding: 10px;
  text-align: center;
  background-color: #f0f0f0;
  border: 2px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-option-button:hover {
  opacity: 0.8;
}

.search-option-label {
  font-size: 14px;
  font-weight: bold;
}

/* ラジオボタン非表示 */
#search-options input[type="radio"],
#search-options-second input[type="radio"] {
  display: none;
}

/* Todo1 ラジオ選択時のスタイル */
input[type="radio"][name="searchOption"]:checked + label .search-option-button {
    background-color: #FF9900;
    color: #000000;
    border-color: #FF9900;
}

input[type="radio"][name="searchOption"][value="rakuten"]:checked + label .search-option-button {
    background-color: #BF0000;
    color: #FFFFFF;
    border-color: #BF0000;
}

input[type="radio"][name="searchOption"][value="yahoo"]:checked + label .search-option-button {
    background-color: #FF0033;
    color: #FFFFFF;
    border-color: #FF0033;
}

/* Todo2 ラジオ選択時のスタイル */
#searchOptionAmazon-second:checked ~ label[for="searchOptionAmazon-second"] .search-option-button {
    background-color: #FF9900;
    color: #000000;
    border-color: #FF9900;
}

#searchOptionRakuten-second:checked ~ label[for="searchOptionRakuten-second"] .search-option-button {
    background-color: #BF0000;
    color: #FFFFFF;
    border-color: #BF0000;
}

#searchOptionYahoo-second:checked ~ label[for="searchOptionYahoo-second"] .search-option-button {
    background-color: #FF0033;
    color: #FFFFFF;
    border-color: #FF0033;
}

/* 楽天・Yahooフォーム要素スタイル */
#rakuten-options,
#yahoo-options,
#rakuten-options-second,
#yahoo-options-second {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow-y: auto;
}

.search-option-select,
.search-option-input {
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 12px;
    width: 100%;
    font-size: 16px;
    height: 44px;
}

.option-row {
    margin-bottom: 0px;
}

.price-range {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-range .search-option-input {
    width: calc(50% - 15px);
}

.price-range-separator {
    font-size: 16px;
}

.search-option-input::placeholder {
    color: #999;
    font-size: 14px;
}

.search-option-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.search-option-select:focus,
.search-option-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Swiperスタイル */
.swiper-container {
  width: 100%;
  height: 125px;
  margin-top: 20px;
  overflow: hidden;
}

.swiper-wrapper {
  display: flex;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

div.card {
  cursor: pointer;
  background-color:rgba(255,255,255,0);
}

div.card img {
  margin-left: 25%;
  max-width: 55%;
  height: auto;
  display: block;
}

/* アコーディオン機能 */
.slide {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  background-color: rgba(0,0,0,0.1) !important;
  border-radius: 8px;
  will-change: max-height, opacity;
}

.slide.collapsed {
  max-height: 0;
}

/* アコーディオンオプションの基本スタイル */
#amazon-options,
#rakuten-options,
#yahoo-options,
#amazon-options-second,
#rakuten-options-second,
#yahoo-options-second {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                padding 0.3s ease,
                visibility 0s linear 0.4s;
    will-change: max-height, opacity;
}

/* アコーディオン開いた状態 */
#amazon-options.accordion-open,
#rakuten-options.accordion-open,
#yahoo-options.accordion-open,
#amazon-options-second.accordion-open,
#rakuten-options-second.accordion-open,
#yahoo-options-second.accordion-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background-color: rgba(0,0,0,0.1);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                padding 0.3s ease,
                visibility 0s linear 0s;
}

/* アコーディオン閉じた状態 */
#amazon-options.accordion-closed,
#rakuten-options.accordion-closed,
#yahoo-options.accordion-closed,
#amazon-options-second.accordion-closed,
#rakuten-options-second.accordion-closed,
#yahoo-options-second.accordion-closed {
    max-height: 0 !important;
    opacity: 0;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background-color: transparent !important;
    visibility: hidden;
    pointer-events: none;
}

ons-select,
ons-input {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
}

/* Yahooオプション要素 */
#yahoo-price-max,
#yahoo-price-min,
#yahoo-condition {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
}

/* セレクト・インプット要素 */
#rakuten-shipping,
#rakuten-sort,
#rakuten-review,
#sortOption,
#pct-offToDo,
#pct-off-endToDo,
#rakuten-min-price,
#rakuten-max-price,
#rakuten-exclude {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
}

.option-row {
  margin-top: 10px;
}

/* Yahoo送料無料スイッチ */
.yahoo-switch-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px solid #ddd;
  border-radius: 6px;
  min-height: 44px;
}

.yahoo-switch-label {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
}

.checkbox ons-checkbox {
  color: #333;
}

.arrow-icon {
  margin-left: 1px;
  font-size: 16px;
  vertical-align: middle;
}

/* ×ボタン (入力フィールドクリア) */
.input-container {
    position: relative;
    flex: 1;
    margin-right: 10px;
}

.input-container input {
    width: 100%;
    padding-right: 30px;
    box-sizing: border-box;
    height: 40px;
}

.clear-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    color: #999;
    font-size: 18px;
    display: none;
}

.clear-button i {
    pointer-events: none;
}

.input-container input:not(:placeholder-shown) + .clear-button {
    display: block;
}

/* 登録ボタン */
.register-box ons-button {
    flex-shrink: 0;
    height: 40px;
    padding: 0 20px;
    font-size: 16px;
}

/* ==========================================
 * Android 15+ エッジツーエッジ対応 (2026-08-07)
 * targetSdk 36 では windowOptOutEdgeToEdgeEnforcement が
 * OS に無視され WebView が全画面化するため、safe-area だけ
 * アプリ全体を内側に寄せる。エッジツーエッジでない環境
 * (API 28 以下・iOS) では env() が全て 0 なので無影響。
 * ========================================== */
#navigator {
    position: absolute;
    top: env(safe-area-inset-top, 0px);
    bottom: env(safe-area-inset-bottom, 0px);
    left: env(safe-area-inset-left, 0px);
    right: env(safe-area-inset-right, 0px);
}

/* ステータスバー/ナビバー領域の下地(従来の黒バー相当)。
   Theme.AppCompat のステータスバーアイコンは白のため黒下地必須 */
body::before,
body::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    background: #000;
    z-index: 2147483647;
    pointer-events: none;
}

body::before {
    top: 0;
    height: env(safe-area-inset-top, 0px);
}

body::after {
    bottom: 0;
    height: env(safe-area-inset-bottom, 0px);
}

/* body 直付けの全画面オーバーレイは navigator の外なので個別に避ける */
.onboarding-overlay {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.template-picker-overlay {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
