.action-card.geoloops-card:hover {
    border-color: rgba(45, 212, 191, 0.5);
}

.action-card.geoloops-card .action-icon {
    color: #2dd4bf;
}

.geoloops-tabs {
    display: flex;
    gap: 0.4rem;
    margin: 0.35rem 0 0.9rem;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.35);
}

.geoloops-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 9px;
    padding: 0.55rem 0.7rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.geoloops-tab.is-active {
    background: rgba(45, 212, 191, 0.16);
    color: #99f6e4;
}

.geoloops-tab-panel.hidden {
    display: none;
}

.geoloops-loop-form-view.hidden,
.geoloops-loops-list-view.hidden {
    display: none;
}

.geoloops-form-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    padding: 1rem 1.05rem 1.15rem;
    box-shadow: var(--shadow);
    display: grid;
    gap: 0.15rem;
}

.geoloops-form-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.geoloops-form-actions .primary,
.geoloops-toolbar .primary {
    border: 1px solid rgba(59, 130, 246, 0.55);
    background: rgba(59, 130, 246, 0.22);
    color: #e0f2fe;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-family: inherit;
    cursor: pointer;
}

.geoloops-form-actions .ghost {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: 10px;
    padding: 0.55rem 0.95rem;
    font-family: inherit;
    cursor: pointer;
}

.geoloops-date-triple {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 0.35rem;
}

.geoloops-date-triple select {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    padding: 0.55rem 0.45rem;
    font-family: inherit;
    font-size: 0.9rem;
}

.geoloops-quiz-checklist-tall {
    max-height: min(58vh, 480px) !important;
}

.geoloops-quiz-tools {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.geoloops-quiz-tools-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.geoloops-quiz-search,
.geoloops-quiz-tools select {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    padding: 0.5rem 0.65rem;
    font-family: inherit;
    font-size: 0.88rem;
    width: 100%;
}

.geoloops-count-preview {
    margin: 0.35rem 0 0.55rem;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(45, 212, 191, 0.35);
    background: rgba(45, 212, 191, 0.1);
    color: #99f6e4;
    font-size: 0.9rem;
    font-weight: 600;
}

.geoloops-count-preview.is-empty {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
    color: #fde68a;
}

@media (max-width: 640px) {
    .geoloops-quiz-tools {
        grid-template-columns: 1fr;
    }
}

.geoloops-dialog-wide {
    width: min(560px, 100%);
    max-height: min(90dvh, 820px);
    overflow-y: auto;
}

.geoloops-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 0.7rem;
}

.geoloops-field-hint {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.geoloops-quiz-checklist,
.geoloops-weekday-checklist {
    display: grid;
    gap: 0.35rem;
    max-height: 180px;
    overflow-y: auto;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}

.geoloops-weekday-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
}

.geoloops-check-item {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: var(--text);
    cursor: pointer;
}

.geoloops-check-item em {
    color: var(--text-muted);
    font-style: normal;
    font-size: 0.8rem;
}

.geoloops-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.35rem 0 0.55rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.geoloops-field select,
.geoloops-field input[type="number"],
.geoloops-field input[type="time"] {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    padding: 0.55rem 0.7rem;
    font-family: inherit;
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .geoloops-form-grid {
        grid-template-columns: 1fr;
    }

    .geoloops-weekday-checklist {
        grid-template-columns: 1fr;
    }
}

.geoloops-panel-head {
    margin-bottom: 0.85rem;
}

.geoloops-panel-head h2 {
    margin: 0.55rem 0 0.2rem;
    font-size: 1.2rem;
}

.geoloops-panel-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.geoloops-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.geoloops-toolbar .primary,
.geoloops-dialog-actions .primary {
    border: 1px solid rgba(59, 130, 246, 0.55);
    background: rgba(59, 130, 246, 0.22);
    color: #e0f2fe;
    border-radius: 10px;
    padding: 0.5rem 0.9rem;
    font-family: inherit;
    cursor: pointer;
}

.geoloops-toolbar .ghost,
.geoloops-dialog-actions .ghost,
.geoloops-channel-actions .ghost {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: 10px;
    padding: 0.45rem 0.8rem;
    font-family: inherit;
    cursor: pointer;
}

.geoloops-error {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    font-size: 0.88rem;
}

.geoloops-channels-list {
    display: grid;
    gap: 0.7rem;
}

.geoloops-empty {
    padding: 1.1rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    text-align: center;
    font-size: 0.92rem;
}

.geoloops-channel-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    padding: 0.9rem 1rem;
    box-shadow: var(--shadow);
}

.geoloops-channel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.geoloops-channel-top h3 {
    margin: 0;
    font-size: 1rem;
}

.geoloops-status {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
}

.geoloops-status-linked {
    color: #86efac;
    background: rgba(34, 197, 94, 0.16);
}

.geoloops-status-pending {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.16);
}

.geoloops-channel-desc {
    margin: 0.45rem 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.geoloops-channel-meta {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.geoloops-channel-meta code {
    font-family: ui-monospace, Consolas, monospace;
    color: #5eead4;
    letter-spacing: 0.04em;
}

.geoloops-channel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.geoloops-channel-actions .danger-btn {
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border-radius: 10px;
    padding: 0.45rem 0.8rem;
    font-family: inherit;
    cursor: pointer;
}

.geoloops-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(2, 6, 23, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.geoloops-overlay.hidden {
    display: none;
}

.geoloops-dialog {
    width: min(440px, 100%);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem 1.1rem 1.15rem;
    box-shadow: var(--shadow);
}

.geoloops-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.geoloops-dialog-head h3 {
    margin: 0;
    font-size: 1.05rem;
}

.geoloops-dialog-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.geoloops-field {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 0.7rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.geoloops-field input,
.geoloops-field textarea {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    padding: 0.55rem 0.7rem;
    font-family: inherit;
    font-size: 0.95rem;
}

.geoloops-dialog-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.geoloops-steps {
    margin: 0 0 0.9rem;
    padding-right: 1.15rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.geoloops-steps li {
    margin-bottom: 0.35rem;
}

.geoloops-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    border: 1px solid rgba(45, 212, 191, 0.4);
    background: rgba(45, 212, 191, 0.1);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
}

.geoloops-code-box code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #99f6e4;
    word-break: break-all;
}

.geoloops-code-box .copy-btn {
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-family: inherit;
    cursor: pointer;
    font-size: 0.85rem;
}

.geoloops-claim-hint {
    margin: 0.65rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.geoloops-chip-filter-groups {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.geoloops-chip-group strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.geoloops-sub-subject-sections {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.geoloops-sub-subject-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.28);
    padding: 0.45rem 0.55rem 0.55rem;
}

.geoloops-sub-subject-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #99f6e4;
}

.geoloops-collection-ranges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.geoloops-collection-range {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.28);
    padding: 0.45rem 0.55rem 0.6rem;
}

.geoloops-year-range-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    align-items: center;
}

.geoloops-year-range-row label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.geoloops-year-select {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.55);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.28rem 0.45rem;
    min-width: 5.2rem;
}

.geoloops-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.geoloops-chip {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.55);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    line-height: 1.3;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.geoloops-chip:hover {
    color: var(--text);
    border-color: rgba(45, 212, 191, 0.45);
    background: rgba(45, 212, 191, 0.1);
}

.geoloops-chip.is-active {
    color: #042f2e;
    background: #2dd4bf;
    border-color: #5eead4;
    font-weight: 700;
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.35);
}

.geoloops-chip.is-active:hover {
    color: #042f2e;
    background: #5eead4;
    border-color: #99f6e4;
}

.geoloops-title-template-chips {
    margin-top: 0.45rem;
}

.geoloops-timer-grid .geoloops-field.hidden {
    display: none;
}

#geoloops-loop-title-template {
    width: 100%;
    min-height: 4.5rem;
    resize: vertical;
    font-family: inherit;
    line-height: 1.55;
}

.geoloops-section-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.geoloops-help-btn {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    border: 1px solid rgba(45, 212, 191, 0.45);
    background: rgba(45, 212, 191, 0.12);
    color: #99f6e4;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.geoloops-help-btn:hover {
    background: rgba(45, 212, 191, 0.22);
}

.geoloops-help-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.7;
}

.geoloops-help-body p {
    margin: 0;
}

.geoloops-channel-card.is-clickable {
    cursor: pointer;
}

.geoloops-channel-card.is-clickable:hover {
    border-color: rgba(45, 212, 191, 0.45);
}

.geoloops-detail-tabs {
    display: flex;
    gap: 0.4rem;
    margin: 0.2rem 0 0.85rem;
}

.geoloops-report-items {
    margin: 0.35rem 0 0;
    padding-inline-start: 1.1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.geoloops-channel-detail-view.hidden,
.geoloops-channels-list-view.hidden {
    display: none;
}

.geoloops-quota-banner {
    margin: 0.45rem 0 0;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid rgba(45, 212, 191, 0.28);
    background: rgba(45, 212, 191, 0.08);
    color: #99f6e4;
    font-size: 0.82rem;
    line-height: 1.55;
}

.geoloops-field.hidden {
    display: none !important;
}
