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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.location-results {
    position: relative;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 8px;
    display: none;
}

.location-results:not(:empty) {
    display: block;
}

.location-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.location-item:hover {
    background-color: #f8f9ff;
}

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

.loading-small {
    padding: 12px;
    text-align: center;
    color: #999;
}

.no-results, .error {
    padding: 12px;
    text-align: center;
    color: #999;
}

.error {
    color: #e74c3c;
}

.selected-location {
    margin-top: 12px;
}

.selected-info {
    background: #f8f9ff;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.btn-primary {
    width: 40%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.loading {
    text-align: center;
    color: white;
    padding: 40px;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    background: #f8f9ff;
    padding: 20px;
    border-radius: 8px;
}

.info-grid div {
    padding: 8px;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9ff;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

tbody tr:hover {
    background-color: #f8f9ff;
}

.angles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.angle-card {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e8ecff;
}

.angle-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1rem;
}

.angle-card p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* Profile Management */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2, .section-header h3 {
    margin: 0;
}

.section-body {
    display: block;
}

.section-collapsed > .section-body {
    display: none;
}

.section-collapsed > .section-header {
    margin-bottom: 0;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.profile-card {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e8ecff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.profile-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.profile-card p {
    margin: 5px 0;
    color: #666;
}

.location-small {
    font-size: 0.9rem;
    color: #999;
}

.birth-signature {
    margin-top: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #5d63b7;
    word-break: break-all;
}

.profile-actions {
    margin-top: 15px;
    display: flex;
    gap: 8px;
}

.btn-secondary {
    background: #5d63b7;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-small.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #d433da 100%);
    color: white;
    font-weight: 600;
}

.btn-small.btn-secondary {
    background: linear-gradient(135deg, #764ba2 0%, #c245de 100%);
    color: white;
}

/* Keyword active state - higher specificity to override btn-secondary */
.btn-small.btn-secondary.keyword-active {
    background: #8f1875 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Blurbs */
.blurb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.blurb-template {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e8ecff;
    cursor: pointer;
    transition: all 0.2s;
}

.blurb-template:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.blurb-text {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.6;
}

.blurb-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #999;
}

.blurb-category {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
}

.blurb-author {
    font-style: italic;
}

.custom-blurb-form {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.custom-blurb-form h4 {
    color: #667eea;
    margin-bottom: 16px;
}

.replacement-group {
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin: 12px 0;
    border: 1px solid #e0e0e0;
}

.replacement-group label strong {
    color: #764ba2;
    font-family: 'Courier New', monospace;
}

.replacement-group label small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 4px;
}

#replacementFields {
    margin: 20px 0;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.generated-blurb {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.blurb-result {
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
}

.blurb-original {
    color: #999;
    font-size: 0.9rem;
    margin: 10px 0;
}

#generatedBlurbs {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e8ecff;
}

#generatedBlurbs h3 {
    color: #667eea;
    margin-bottom: 20px;
}
/* Delete button on blurb templates */
.btn-delete {
    background: linear-gradient(135deg, #ff4781 0%, #d433da 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #ee2f3d;
}

.site-footer {
    text-align: center;
}

.site-footer-eyebrow {
    color: #5d63b7;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.site-footer h2 {
    margin-bottom: 12px;
}

.site-footer p:not(.site-footer-eyebrow) {
    max-width: 560px;
    margin: 0 auto 20px;
    color: #666;
    line-height: 1.6;
}

.cross-app-nav-note {
    max-width: 560px;
    margin: 0 auto 20px;
    color: #666;
    line-height: 1.6;
}

.app-surface-switcher {
    display: flex;
    justify-content: center;
    margin: -8px 0 14px;
}

.app-surface-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(102, 126, 234, 0.18);
    box-shadow: 0 6px 20px rgba(22, 28, 80, 0.12);
    backdrop-filter: blur(6px);
}

.app-surface-tab {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #4d5698;
    transition: background 0.18s ease, color 0.18s ease;
}

a.app-surface-tab:hover {
    background: #edf0ff;
    color: #2d3671;
}

.app-surface-tab-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.site-footer-link {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-decoration: none;
}

.site-footer-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.25);
}

.site-footer-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.site-footer-link-secondary {
    background: linear-gradient(135deg, #5d63b7 0%, #3b4088 100%);
}

.app-shell {
    max-width: 1000px;
}

.app-header {
    text-align: center;
    color: white;
    margin-bottom: 28px;
}

.app-header h1 {
    font-size: 2.4rem;
}

.app-section {
    margin-bottom: 20px;
}

.app-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.app-panel {
    margin-top: 10px;
}

.forum-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.forum-topic-link {
    display: block;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #dce2ff;
    background: #f8f9ff;
    text-decoration: none;
    color: #2f355d;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.forum-topic-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(85, 98, 190, 0.15);
}

.forum-topic-slug {
    font-family: 'Courier New', monospace;
    font-size: 0.83rem;
    color: #5562be;
}

.forum-new-comment {
    margin-bottom: 18px;
}

.forum-form-actions {
    margin-top: 10px;
}

.forum-form-error {
    margin-top: 8px;
    color: #b22a2a;
    font-size: 0.9rem;
    min-height: 1rem;
}

.forum-thread-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.forum-comment {
    background: #fdfdff;
    border: 1px solid #e5e8fb;
    border-radius: 10px;
    padding: 12px;
}

.forum-comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    color: #555;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.forum-comment-text {
    margin-bottom: 10px;
    white-space: normal;
}

.forum-reply-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.forum-replies {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (max-width: 600px) {
    .app-header h1 {
        font-size: 2rem;
    }
}

.btn-edit-template {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: opacity 0.2s, transform 0.1s;
    opacity: 0.85;
}

.btn-edit-template:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.blurb-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.blurb-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    color: #667eea;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Bin modal */
.bin-item {
    background: #f8f9ff;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #ff4757;
}

.bin-item .blurb-text {
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
}

.bin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-danger {
    background: #ff4757 !important;
}

.btn-danger:hover {
    background: #ee2f3d !important;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 1.1rem;
}

/* Profile labels and filters */
.blurb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.profile-label {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-edit {
    background: #764ba2;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.btn-submit {
    background: #1b812e;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.btn-edit:hover {
    background: #5d3a82;
}

.btn-copy {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.btn-copy:hover {
    background: #5568d3;
}

.profile-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 8px;
}

.filter-btn {
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: #667eea;
}

.filter-exclude {
    background: #ffe5e5;
    border-color: #ff4757;
    color: #ff4757;
}

.filter-include {
    background: #e5f7e5;
    border-color: #2ecc71;
    color: #2ecc71;
}

.section-header > div {
    display: flex;
    gap: 10px;
}
.filter-message {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

.syn-pair-select {
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
    transition: border-color 0.2s;
}

.syn-pair-select:hover,
.syn-pair-select:focus {
    border-color: #667eea;
}

.syn-pair-sep {
    color: #999;
    font-size: 0.9rem;
    user-select: none;
}
/* Chart View Styles */
.chart-wheel {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    min-height: 700px;
    overflow: visible;
    padding: 20px;
}

.synastry-wheel {
    min-height: 420px;
    padding: 8px 20px 20px;
}

/* Allow chart SVG labels/symbols that extend outside the SVG boundary to show */
.chart-wheel svg {
    overflow: visible !important;
}

.chart-display {
    margin-top: 20px;
}

.chart-table-wrapper {
    background: #ffffff;
    border: 1px solid #e8ecff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 1.5rem;
}

.chart-table-wrapper .section-header {
    margin-bottom: 12px;
}

.chart-table-wrapper .section-body {
    padding-top: 0;
}

.chart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    background: #ffffff;
}

.chart-table th,
.chart-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.chart-table thead {
    background: #e9ecef;
}

.chart-table th {
    font-weight: 600;
    color: #667eea;
}

.chart-table tbody tr {
    background: #ffffff;
}

.chart-table tbody tr:hover {
    background: #f8f9fa;
}

.profile-selector {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.profile-selector:hover,
.profile-selector:focus {
    border-color: #667eea;
    outline: none;
}

/* Template filter styles */
.blurb-template-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 10px;
    border: 1px solid #3b53bc;
}

.blurb-template-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.blurb-template-clickable.filter-exclude {
    opacity: 0.5;
    background: #ffe5e5;
}

.blurb-template-clickable.filter-include {
    border: 3px solid #2ecc71;
    background: #e5f7e5;
}

.filter-indicator {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Synastry Selection States */
.synastry-selected-1 {
    border: 3px solid #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.synastry-selected-2 {
    border: 3px solid #f5576c !important;
    box-shadow: 0 0 0 3px rgba(245, 87, 108, 0.2);
}

.profile-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Chart tabs */
.chart-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8ecff;
}

.chart-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.chart-tab:hover {
    color: #667eea;
}

.chart-tab-active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Transit controls */
.transit-controls {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e8ecff;
}

.transit-controls-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* Transit date/time steppers */
.transit-steppers-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.transit-steppers {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.time-stepper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.stepper-label {
    font-size: 0.7rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stepper-btn {
    background: none;
    border: 1px solid #d0d4f0;
    border-radius: 4px;
    width: 40px;
    height: 22px;
    cursor: pointer;
    font-size: 0.6rem;
    color: #667eea;
    padding: 0;
    line-height: 1;
    transition: background 0.12s, border-color 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stepper-btn:hover {
    background: #eef0ff;
    border-color: #667eea;
}

.stepper-btn-far {
    opacity: 0.55;
    font-size: 0.5rem;
    letter-spacing: -0.05em;
}

.stepper-btn-far:hover {
    opacity: 1;
}

.stepper-input {
    width: 40px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d2d4e;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 2px 0;
    background: transparent;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    transition: border-color 0.15s, background 0.15s;
}

.stepper-input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
}

.stepper-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d2d4e;
    min-width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    padding: 2px 0;
}

.stepper-divider {
    width: 1px;
    height: 156px;
    background: #d0d4f0;
    margin: 0 6px;
    align-self: center;
}

.transit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.transit-search-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.transit-search-field {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #556;
}

.transit-search-input {
    width: 52px;
    padding: 6px 8px;
    border: 1px solid #d0d4f0;
    border-radius: 6px;
    font-size: 0.93rem;
    color: #2d2d4e;
}

.transit-search-status {
    min-height: 1.3em;
    margin-top: 8px;
    color: #5f6478;
    font-size: 0.92rem;
    white-space: pre-line;
}

.transit-search-status-success {
    color: #4b7a3d;
}

.transit-search-status-error {
    color: #b94a48;
}

.transit-now-btn {
    align-self: center;
    white-space: nowrap;
}

.transit-profile-create {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.transit-profile-input {
    min-width: 180px;
    padding: 8px 10px;
    border: 1px solid #d0d4f0;
    border-radius: 6px;
    font-size: 0.95rem;
}

.transit-profile-input:focus {
    outline: none;
    border-color: #667eea;
}

.transit-profile-status {
    margin-top: 8px;
    color: #666;
    font-size: 0.92rem;
    min-height: 1.2em;
}

.transit-profile-status-success {
    color: #4b7a3d;
}

.transit-profile-status-error {
    color: #b94a48;
}

.transit-aspect-filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

.card-inset {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e8ecff;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .blurb-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 12px 0;
    }

    .blurb-template,
    .blurb-template-clickable {
        padding: 12px 14px;
    }

    .blurb-text {
        font-size: 0.7rem;
        margin-bottom: 8px;
    }

    .blurb-meta {
        font-size: 0.78rem;
    }
    
    [class*="btn-"], .filter-btn, .syn-pair-select {
        font-size: 0.78rem;
        padding: 6px 10px;
    }
}