/* 選んだ文をGoogleタスクにする（閲覧画面・編集画面のプレビュー） */
.gt-bar {
    position: absolute; z-index: 9000; display: none; gap: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,.22); border-radius: 8px; overflow: hidden;
}
.gt-bar.show { display: inline-flex; }
.gt-bar-fixed {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)); top: auto !important;
}
.gt-bar button {
    border: none; background: #0d6efd; color: #fff; font-size: .85rem; font-weight: 600;
    padding: 0 14px; min-height: 40px; cursor: pointer; white-space: nowrap;
}
.gt-bar .gt-more { padding: 0 10px; border-left: 1px solid rgba(255,255,255,.35); font-weight: 400; }
.gt-bar button:hover { background: #0b5ed7; }
.gt-bar button:disabled { opacity: .7; cursor: default; }
.gt-bar .gt-ic { margin-right: 2px; }

.gt-panel {
    position: absolute; z-index: 9001; width: min(360px, calc(100vw - 16px));
    background: #fff; border: 1px solid #dee2e6; border-radius: 12px; padding: 12px;
    box-shadow: 0 12px 34px rgba(0,0,0,.25); font-size: .85rem; color: #212529;
}
.gt-panel .gt-lab { font-size: .75rem; color: #6c757d; margin: 8px 0 4px; }
.gt-panel .gt-lab:first-child { margin-top: 0; }
.gt-title, .gt-list, .gt-date {
    width: 100%; font-size: 16px; padding: 7px 9px; border: 1px solid #ced4da; border-radius: 8px;
    font-family: inherit; box-sizing: border-box;
}
.gt-title { resize: vertical; height: auto; min-height: 46px; max-height: 150px; line-height: 1.5; }
.gt-dues { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gt-chip {
    border: 1px solid #ced4da; background: #fff; border-radius: 999px;
    padding: 5px 12px; font-size: .8rem; cursor: pointer; min-height: 32px;
}
.gt-chip.on { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.gt-dues .gt-date { width: auto; flex: 1; min-width: 140px; font-size: .8rem; padding: 5px 8px; }
.gt-notes {
    white-space: pre-wrap; word-break: break-word; max-height: 130px; overflow: auto;
    background: #f8f9fa; border: 1px solid #eef0f2; border-radius: 8px; padding: 8px;
    font-size: .76rem; color: #495057;
}
.gt-row { display: flex; gap: 8px; margin-top: 12px; }
.gt-ok { flex: 1; border: none; background: #0d6efd; color: #fff; border-radius: 8px; min-height: 40px; font-weight: 600; cursor: pointer; }
.gt-cancel { border: 1px solid #ced4da; background: #fff; border-radius: 8px; min-height: 40px; padding: 0 14px; cursor: pointer; }

.gt-toast {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(66px + env(safe-area-inset-bottom, 0px)); z-index: 9002;
    background: #111827; color: #fff; font-size: .85rem; border-radius: 999px;
    padding: 9px 16px; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 24px);
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.gt-toast.err { background: #b91c1c; }
.gt-toast .gt-link {
    color: #93c5fd; background: none; border: none; font-size: .85rem; text-decoration: underline;
    cursor: pointer; padding: 0; white-space: nowrap;
}
[data-theme="dark"] .gt-panel { background: #1e1f22; border-color: #3a3d42; color: #e6e6e6; }
[data-theme="dark"] .gt-notes { background: #26282c; border-color: #3a3d42; color: #cfd3d8; }
[data-theme="dark"] .gt-chip, [data-theme="dark"] .gt-cancel,
[data-theme="dark"] .gt-title, [data-theme="dark"] .gt-list, [data-theme="dark"] .gt-date {
    background: #26282c; border-color: #3a3d42; color: #e6e6e6;
}
@media print { .gt-bar, .gt-panel, .gt-toast { display: none !important; } }

/* 選択ツールバーに相乗りする項目（例: 編集画面の「← ここに移動」） */
.gt-bar .gt-group { display: inline-flex; }
.gt-bar .gt-group:empty { display: none; }
.gt-bar .gt-act { background: #495057; font-weight: 600; }
.gt-bar .gt-act:hover { background: #343a40; }
.gt-bar .gt-act + .gt-act { border-left: 1px solid rgba(255,255,255,.35); }
