
:root[data-theme=light] {
    --bg-primary: #f7f8f9;
    --text-primary: #111827;
    --text-secondary: #585d67;
    --border-color: #e5e7eb;
    --accent-color: #c10e81;
    --link-hover: #0b8718;
    --lbv-color-1: #006587;
    --lbv-color-2: #bf4c0a;
    --card-bg: #ffffff;
    --radius-card: 16px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.05);
}

:root[data-theme=dark] {
    --bg-primary: #0a0d15;
    --text-primary: #C0C7C6;
    --text-secondary: #9ca3af;
    --border-color: #374151;
    --accent-color: #07a518;
    --link-hover: #c10e81;
    --lbv-color-1: #00b3f0;
    --lbv-color-2: #f5772d;
    --card-bg: #1c1f26;
    --radius-card: 16px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
}

body, html {
    width: 100%;
    min-height: 100vh;
    overflow-x: clip;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    color: var(--text-primary);
    font-size: 18px;
    scroll-behavior: smooth;
    transition: background .4s, color .4s
}

*, body, html {
    margin: 0;
    padding: 0
}

*, ::after, ::before {
    box-sizing: border-box
}

.ich-wrap {
    position: relative;
    color: var(--text-primary);
    padding: 0 0 30px;
    box-sizing: border-box;
    overflow: hidden;
}

.ich-step {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    animation: ich-fadeUp 0.45s ease-out;
}

.ich-step.active {
    display: block;
}

.ich-hero {
    position: relative;
    text-align: center;
    padding: 60px 20px 40px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ich-hero .ich-hero-svg-wrap {
    position: absolute;
    top: -40px;
    bottom: -40px;
    left: 0;
    right: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.9;
    -webkit-mask-image: radial-gradient(circle closest-side at 50% 50%, black 65%, transparent 100%);
    mask-image: radial-gradient(circle closest-side at 50% 50%, black 65%, transparent 100%);
}

.ich-hero .ich-hero-content {
    position: relative;
    z-index: 2;
}

.ich-hero-badge {
    display: inline-block;
    padding: 5px 18px;
    background: color-mix(in srgb, var(--lbv-color-1) 8%, transparent);
    border: 1px solid var(--border-color);
    color: var(--lbv-color-1);
    border-radius: 99px;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.ich-hero-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.2;
}

.ich-hero-title span {
    background: linear-gradient(135deg, var(--lbv-color-1), var(--lbv-color-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ich-hero-sub {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0;
    letter-spacing: 0.04em;
}

.ich-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px 0 20px;
}

.ich-back-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.ich-back-btn:hover {
    color: var(--lbv-color-1);
    border-color: var(--lbv-color-1);
}

.ich-step-label {
    font-size: 0.88rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.ich-input-section {
    margin-bottom: 24px;
    margin-left: auto;
    margin-right: auto;
}

.ich-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 12px 0;
}

.ich-input {
    width: 100%;
    padding: 13px 16px;
    background: color-mix(in srgb, var(--bg-primary) 96%, white 4%);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.ich-deep-form-row > .ich-input {
    width: 60%;
}

.ich-deep-form-row > .ich-gender-select {
    width: 40%;
}

.ich-input::placeholder {
    color: color-mix(in srgb, var(--text-secondary) 60%, transparent);
}

.ich-input:focus {
    outline: none;
    border-color: var(--lbv-color-1);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lbv-color-1) 15%, transparent);
}

.ich-textarea {
    min-height: 90px;
    line-height: 1.6;
    resize: none;
}

.ich-error {
    display: block;
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-top: 5px;
    min-height: 17px;
}

.ich-suggest-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}

.ich-chip {
    background: color-mix(in srgb, var(--lbv-color-1) 7%, transparent);
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 25%, transparent);
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: 99px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.ich-chip:hover {
    background: color-mix(in srgb, var(--lbv-color-1) 18%, transparent);
    color: var(--lbv-color-1);
    border-color: var(--lbv-color-1);
}

.ich-submit-btn {
    width: 200px;
    padding: 14px;
    text-align: center;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--lbv-color-1), var(--lbv-color-2));
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.2s;
}

:root[data-theme="dark"] .ich-submit-btn {
    color: #111 !important;
}

.ich-btn-fixed-width {
    max-width: 250px;
    min-width: 200px;
}

.ich-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.ich-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ich-btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.ich-btn-text {
    color: #fff;
}

.ich-submit-btn.loading .ich-btn-text {
    display: none;
}

.ich-submit-btn.loading .ich-btn-loading {
    display: inline-flex;
}

.ich-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: ich-spin 0.7s linear infinite;
}

.ich-toss-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: visible;
    margin-bottom: 32px;
    min-height: 380px;
}

.ich-toss-left {
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--bg-primary) 97%, white 3%);
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    border-radius: 16px 0 0 16px;
}

.ich-toss-left-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 300px;
}

.ich-toss-progress {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 20px;
}

.ich-toss-step-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ich-toss-counter {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--lbv-color-1);
    line-height: 1;
}

.ich-toss-total {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.ich-toss-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-align: center;
    min-height: 22px;
    margin-bottom: 16px;
    transition: opacity 0.3s;
}

.ich-toss-hint strong {
    color: var(--lbv-color-1);
}

.ich-btn-toss-main {
    width: auto;
    min-width: 160px;
    padding: 13px 28px;
    font-size: 15px;
    margin: 0 auto 12px;
    border-radius: 12px;
}

.ich-toss-instruction-small {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
    opacity: 0.7;
    line-height: 1.5;
}

.ich-toss-right {
    display: flex;
    flex-direction: column;
    padding: 28px 28px 24px;
    background: color-mix(in srgb, var(--lbv-color-1) 3%, var(--bg-primary));
    overflow: visible;
    border-radius: 0 16px 16px 0;
}

.ich-toss-right-header {
    margin-bottom: 20px;
}

.ich-toss-right-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lbv-color-1);
    margin-bottom: 3px;
}

.ich-toss-right-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.ich-hao-legend {
    display: flex;
    gap: 16px;
    margin-top: auto;
    padding-top: 16px;
}

.ich-legend-item {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ich-legend-change {
    color: #ff3e3e;
    opacity: 0.8;
}

.ich-coins-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 0 0 16px;
    perspective: 1000px;
}

.ich-coin {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffdf70 0%, #d4af37 40%, #8c6a1d 90%);
    border: 2px solid #5a3a08;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6),
    inset 2px 2px 5px rgba(255, 255, 255, 0.4),
    0 6px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.ich-coin::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--bg-primary);
    border: 2px solid #4a3000;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8), 0 0 4px rgba(255, 215, 0, 0.5);
    z-index: 2;
}

.ich-coin::after {
    position: absolute;
    font-size: 9px;
    color: rgba(60, 40, 0, 0.9);
    font-weight: 900;
    top: 5px;
    letter-spacing: 1.5px;
    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.3);
    z-index: 3;
}

.ich-coin.heads::after {
    content: 'DƯƠNG';
}

.ich-coin.tails::after {
    content: 'ÂM';
}

.ich-coin.spinning {
    animation: ich-toss-epic 1.6s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes ich-toss-epic {
    0% {
        transform: translateY(0) rotateX(0deg) scale(1);
        filter: brightness(1);
    }
    40% {
        transform: translateY(-160px) rotateX(1800deg) scale(1.25);
        filter: brightness(1.3);
        box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
    }
    80% {
        transform: translateY(10px) rotateX(3600deg) scale(0.95);
        filter: brightness(0.9);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    }
    100% {
        transform: translateY(0) rotateX(3600deg) scale(1);
        filter: brightness(1);
    }
}

.ich-hexagram-builder {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    overflow: visible;
}

.ich-line-slot {
    display: flex;
    align-items: center;
    width: 100%;
    height: 24px;
    padding-right: 0;
}

.ich-line-label {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: right;
    padding-right: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.65;
}

.ich-line-draw {
    flex: 1;
    height: 14px;
    position: relative;
    overflow: visible;
    margin-right: 28px;
}

.ich-yang,
.ich-yin::before,
.ich-yin::after {
    background: linear-gradient(180deg, #fcebb6 0%, #d4af37 50%, #b58d22 100%);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    border-radius: 3px;
}

.ich-yang {
    width: 100%;
    height: 100%;
}

.ich-yin {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
}

.ich-yin::before,
.ich-yin::after {
    content: '';
    width: 43%;
    height: 100%;
}

.ich-line.ich-changing {
    position: relative;
}

.ich-change-mark {
    position: absolute;
    right: -26px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff3e3e;
    font-weight: 900;
    font-size: 1.1rem;
    line-height: 1;
    text-shadow: 0 0 8px rgba(255, 62, 62, 0.7);
    animation: ich-pulse-glow 1.5s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes ich-pulse-glow {
    from {
        opacity: 0.6;
        text-shadow: 0 0 5px rgba(255, 62, 62, 0.5);
    }
    to {
        opacity: 1;
        text-shadow: 0 0 14px rgba(255, 62, 62, 1);
    }
}

.ich-result-container {
    display: none;
    margin-top: 30px;
}

.ich-context-badge {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: color-mix(in srgb, var(--lbv-color-1) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 18%, transparent);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.ich-detail-wrapper {
    display: none;
    margin-top: 30px;
}

.ich-section-title {
    color: var(--lbv-color-1);
    margin: 0 0 20px;
    font-weight: 700;
}

.ich-collapsible-header {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.ich-detail-content {
    display: none;
    max-height: 5000px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    opacity: 1;
    font-size: 16px;
}

.ich-detail-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 24px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.ich-detail-tab {
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 0;
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0.04em;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ich-detail-tab:hover {
    color: var(--lbv-color-1);
}

.ich-detail-tab.active {
    background: transparent;
    border-bottom: 2px solid var(--lbv-color-1);
    color: var(--lbv-color-1);
}

.ich-detail-panel {
    display: none;
}

.ich-detail-panel.active {
    display: block;
}

.ich-logic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ich-logic-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ich-logic-item {
    padding: 12px 14px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--lbv-color-1) 5%, var(--card-bg));
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 12%, var(--border-color));
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ich-logic-item span {
    word-break: break-word;
}

.ich-logic-note {
    margin: 14px 0 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 767px) {
    .ich-logic-grid,
    .ich-logic-grid-2 {
        grid-template-columns: 1fr;
    }
}

.ich-detail-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.ich-card-detail {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.ich-cd-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--lbv-color-1);
    padding-left: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ich-cd-pos {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ich-cd-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.ich-cd-name small {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.9rem;
}

.ich-badge-element {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 99px;
    border: 1px solid transparent;
}

.ich-el-kim {
    color: #d4af37;
    background: color-mix(in srgb, #d4af37 10%, transparent);
    border-color: #d4af3744;
}

.ich-el-mộc {
    color: #10b981;
    background: color-mix(in srgb, #10b981 10%, transparent);
    border-color: #10b98144;
}

.ich-el-thủy {
    color: #0ea5e9;
    background: color-mix(in srgb, #0ea5e9 10%, transparent);
    border-color: #0ea5e944;
}

.ich-el-hỏa {
    color: #f43f5e;
    background: color-mix(in srgb, #f43f5e 10%, transparent);
    border-color: #f43f5e44;
}

.ich-el-thổ {
    color: #f59e0b;
    background: color-mix(in srgb, #f59e0b 10%, transparent);
    border-color: #f59e0b44;
}

.ich-cd-mindset {
    font-size: 0.9rem;
    margin-top: 12px;
    color: var(--text-primary);
}

.ich-cd-judgment {
    font-size: 0.9rem;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.ich-line-list {
    margin: 10px 0 0 0;
    padding-left: 20px;
    list-style: disc;
}

.ich-line-list li {
    font-size: .9rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.ich-form-deep h4 {
    color: var(--lbv-color-1);
    margin-bottom: 10px;
    font-weight: 700;
}

#ich-deep-analysis-form {
    display: none;
}

.ich-form-deep p {
    font-size: 0.85rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.ich-analysis-result-wrap {
    display: none;
    margin: 30px 0;
    border-radius: 16px;
    overflow: hidden;
}

.ich-analysis-header {
    border-bottom: 1px solid var(--border-color);
}

.ich-analysis-title {
    color: var(--lbv-color-1);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.ich-analysis-content {
    min-height: 150px;
    font-size: 16px;
}

/* Markdown styles for analysis content */
.ich-analysis-content h2 {
    color: var(--lbv-color-1);
    font-size: 18px;
    font-weight: 700;
    margin: 20px 0 12px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.ich-analysis-content h3 {
    color: var(--lbv-color-1);
    font-size: 16px;
    font-weight: 600;
    margin: 16px 0 10px 0;
}

.ich-analysis-content ul {
    margin: 12px 0;
    padding-left: 20px;
}

.ich-analysis-content li {
    margin-bottom: 6px;
    color: var(--text-primary);
    line-height: 1.6;
}

.ich-analysis-content p {
    margin: 10px 0;
    color: var(--text-primary);
    line-height: 1.8;
}

.ich-analysis-content strong {
    color: var(--lbv-color-1);
    font-weight: 600;
}

.ich-analysis-content em {
    color: var(--text-secondary);
    font-style: italic;
}

#ast-final-result h2 {
    color: var(--lbv-color-1);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px 0 !important;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

#ast-final-result h3 {
    font-size: 18px;
    color: var(--lbv-color-1);
    margin: 16px 0 10px 0;
    padding-left: 12px;
    border-left: 3px solid var(--lbv-color-1);
}

#ich-deep-analysis-form .ich-submit-btn {
    text-align: left;
    margin: 15px 0 0 0;
}

.ich-action-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.ich-reload {
    cursor: pointer;
    color: var(--link-hover);
    font-size: 16px;
    text-decoration: underline;
    text-align: right;
}

.ich-chat-wrap {
    margin-bottom: 24px;
}

.ast-chat-bubble {
    display: block;
}

.ast-chat-body {
    border: 1px solid var(--border-color);
    border-radius: 0 16px 16px 16px;
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.9;
    min-height: auto;
    white-space: normal;
    margin-bottom: 20px;
}

.ast-tw-greeting, .ast-tw-intro, .ast-tw-index, .ast-tw-text {
    display: inline;
    margin-bottom: 8px;
}

.ast-tw-greeting {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--lbv-color-1), var(--lbv-color-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline;
    margin-bottom: 4px;
}

.ast-tw-text {
    display: inline;
    color: var(--text-primary);
    font-size: 16px;
}

.ast-tw-index {
    display: flex;
    align-items: baseline;
    color: var(--text-primary);
    padding: 4px 0;
    flex-wrap: wrap;
    font-weight: 500;
}

.ast-tw-num {
    font-weight: 700;
    margin: 0 6px;
}

.ast-cursor {
    display: inline;
    color: var(--lbv-color-1);
    font-weight: 300;
    margin-left: 0;
    vertical-align: baseline;
}

.ast-cursor-blink {
    animation: ich-blink 0.8s step-end infinite;
}

.ich-cd-body p {
    margin-bottom: 0 !important;
}

@keyframes ich-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.ast-tw-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-left: 8px;
}

.ast-hint-skeleton {
    display: inline-block;
    width: 100px;
    height: 10px;
    background: linear-gradient(90deg,
    color-mix(in srgb, var(--border-color) 80%, transparent) 25%,
    color-mix(in srgb, var(--border-color) 40%, transparent) 50%,
    color-mix(in srgb, var(--border-color) 80%, transparent) 75%);
    background-size: 200% 100%;
    animation: ich-shimmer 1.4s infinite;
    border-radius: 4px;
    vertical-align: middle;
    transition: opacity 0.3s ease;
}

.ast-tw-hint-text {
    font-size: 16px;
    color: #ff5500;
    font-style: italic;
    opacity: 0.8;
}

.ast-skeleton {
    border-radius: 8px;
    background: linear-gradient(90deg,
    color-mix(in srgb, var(--border-color) 80%, transparent) 25%,
    color-mix(in srgb, var(--border-color) 40%, transparent) 50%,
    color-mix(in srgb, var(--border-color) 80%, transparent) 75%);
    background-size: 200% 100%;
    animation: ich-shimmer 1.4s infinite;
    margin-bottom: 12px;
}

.ast-sk-title {
    height: 18px;
    width: 50%;
    margin-bottom: 16px;
}

.ast-sk-line {
    height: 12px;
    width: 100%;
}

.ast-sk-short {
    width: 70%;
}

@keyframes ich-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ich-fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes ich-pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

@keyframes ich-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 860px) {
    .ich-toss-layout {
        grid-template-columns: 1fr 1fr;
    }

    .ich-coin {
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 767px) {
    .ich-toss-layout {
        grid-template-columns: 1fr;
        min-height: unset;
        border-radius: unset;
    }

    .ich-toss-left {
        border-right: none;
        padding: 24px 20px;
        border-radius: unset;
    }

    .ich-toss-right {
        padding: 20px;
        border-radius: unset;
    }

    .ich-coin {
        width: 50px;
        height: 50px;
    }

    .ich-coins-container {
        gap: 14px;
    }

    .ich-hero-title {
        font-size: 1.5rem;
    }

    .ich-coin::before {
        width: 10px;
        height: 10px;
    }

    .ich-coin::after {
        font-size: 8px;
        top: 8px;
    }

    .ich-btn-toss-main {
        min-width: 120px;
        padding: 8px 15px;
        font-size: 14px;
    }
}

.ich-question-tips {
    margin-top: 12px;
    padding: 14px 16px;
    background: color-mix(in srgb, var(--lbv-color-1) 5%, transparent);
    border-left: 3px solid var(--lbv-color-1);
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ich-question-tips > div {
    margin-bottom: 8px;
}

.ich-question-tips > div:last-child {
    margin-bottom: 0;
}

.ich-question-tips strong {
    color: var(--lbv-color-1);
}

.ich-disclaimer {
    margin-top: 50px;
    padding: 14px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.8em;
    color: var(--text-secondary, #9ca3af);
    font-style: italic;
    line-height: 1.6;
}

.ich-landing-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.ich-method-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    align-items: stretch;
}

.ich-method-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ich-card-svg-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.ich-method-card:hover .ich-card-svg-wrap {
    opacity: 0.7;
}

.ich-method-card > *:not(.ich-card-svg-wrap) {
    position: relative;
    z-index: 1;
}

.ich-method-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--lbv-color-1) 0%, var(--lbv-color-2) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.ich-method-card:hover {
    border-color: var(--lbv-color-1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
    transform: translateY(-5px);
}

.ich-method-card:hover::before {
    transform: scaleX(1);
}

.ich-card-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.ich-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: var(--text-primary);
}

.ich-card-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 25px 0;
}

.ich-card-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
    flex-grow: 1;
}

.ich-feature {
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 5px;
}

.ich-method-card .ich-card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--lbv-color-1) 0%, var(--lbv-color-2) 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.ich-card-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.ich-landing-note {
    background: color-mix(in srgb, var(--lbv-color-1) 5%, transparent);
    border-left: 4px solid var(--lbv-color-1);
    padding: 20px 25px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 30px;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .ich-method-grid {
        grid-template-columns: 1fr;
    }

    .ich-landing-wrap {
        padding: 30px 15px;
    }
}

.ich-card-header-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.ich-card-header-inline .ich-card-icon {
    font-size: 32px;
    margin-bottom: 0;
    line-height: 1;
}

.ich-card-header-inline .ich-card-title {
    margin: 0;
}

.ich-deep-form-row {
    display: flex;
    gap: 10px;
}

.ich-back-link-wrap {
    margin-top: 20px;
    font-size: 15px;
}

.ich-back-link-wrap a {
    text-decoration: none;
}

.ich-hero-section {
    position: relative;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
    border: none;
    background: transparent;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ich-hero-svg-wrap {
    position: absolute;
    /* Ăn gian tràn lề trên dưới 60px để vòng tròn có không gian bung to hết cỡ */
    top: -60px;
    bottom: -60px;
    left: 0;
    right: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;

    /* Dùng closest-side kết hợp nới lề giúp vòng tròn vừa to vừa không bao giờ bị cắt viền */
    -webkit-mask-image: radial-gradient(circle closest-side at 50% 50%, black 65%, transparent 100%);
    mask-image: radial-gradient(circle closest-side at 50% 50%, black 65%, transparent 100%);
}

.ich-hero-content {
    position: relative;
    z-index: 2;
}

.ich-hero-content .ich-hero-badge {
    animation: ich-fadeUp 0.7s ease-out both;
}

.ich-hero-content .ich-hero-title {
    animation: ich-fadeUp 0.7s 0.1s ease-out both;
}

.ich-hero-content .ich-hero-sub {
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.75;
    animation: ich-fadeUp 0.7s 0.2s ease-out both;
}

/* ========================================================
   SVG ANIMATIONS (ĐÃ FIX LỖI SAFARI / iOS)
======================================================== */
/* 1. Bắt buộc dùng tọa độ pixel tuyệt đối (450px 200px) thay vì 50% 50% để Safari không quay lệch tâm */
.ich-svg-orbit,
.ich-svg-orbit-rev,
.ich-svg-float,
.ich-svg-pulse-ring {
    transform-origin: 450px 200px;
}

.ich-svg-orbit {
    animation: ich-orbit-slow 60s linear infinite;
}

.ich-svg-orbit-rev {
    animation: ich-orbit-slow 80s linear infinite reverse;
}

.ich-svg-float {
    animation: ich-float 5s ease-in-out infinite;
}

.ich-svg-pulse-ring {
    animation: ich-pulse-ring 3.5s ease-out infinite;
}

@keyframes ich-orbit-slow {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ich-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* 2. Dùng scale() thay cho r để tương thích 100% với iPhone/Safari */
@keyframes ich-pulse-ring {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }
    80% {
        opacity: 0;
        transform: scale(1.65);
    }
    100% {
        opacity: 0;
        transform: scale(1.65);
    }
}

@media (max-width: 768px) {
    .ich-hero-section {
        padding: 40px 20px;
        border-radius: 16px;
    }
}

.ich-section-sep {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 60px 0;
}

.ich-comp-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lbv-color-1);
    background: color-mix(in srgb, var(--lbv-color-1) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 28%, transparent);
    border-radius: 99px;
    padding: 4px 14px;
    margin-bottom: 16px;
}

.ich-comp-title {
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.ich-comp-sub {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.ich-tabs-wrap {
    position: relative;
    margin-bottom: 50px;
}

.ich-tab-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 28px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.ich-tab-nav::-webkit-scrollbar {
    display: none;
}

.ich-tab-btn {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 18px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 8px 8px 0 0;
    transition: color 0.2s, background 0.2s;
    position: relative;
    gap: 4px;
}

.ich-tab-btn .ich-tab-symbol {
    font-size: 1.35rem;
    line-height: 1;
}

.ich-tab-btn:hover {
    color: var(--lbv-color-1);
    background: color-mix(in srgb, var(--lbv-color-1) 6%, transparent);
}

.ich-tab-btn.active {
    color: var(--lbv-color-1);
}

.ich-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--lbv-color-1), var(--lbv-color-2));
    border-radius: 2px 2px 0 0;
}

.ich-tab-panel {
    display: none;
    animation: ich-fadeUp 0.35s ease-out;
}

.ich-tab-panel.active {
    display: block;
}

/* Quái panel grid */
.ich-quai-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .ich-quai-grid {
        grid-template-columns: 1fr;
    }
}

.ich-quai-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.ich-quai-card:hover {
    border-color: var(--lbv-color-1);
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}

.ich-quai-glyph {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--lbv-color-1) 9%, transparent);
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 22%, transparent);
    color: var(--lbv-color-1);
}

.ich-quai-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.ich-quai-meta {
    font-size: 0.75rem;
    color: var(--lbv-color-1);
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.ich-quai-body p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.ich-quai-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.ich-quai-tag {
    font-size: 0.7rem;
    padding: 2px 9px;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--lbv-color-1) 5%, transparent);
}

/* Quẻ tiêu biểu panel */
.ich-hexagram-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ich-hex-row {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.ich-hex-row:hover {
    border-color: var(--lbv-color-1);
}

.ich-hex-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}

.ich-hex-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--lbv-color-1);
    background: color-mix(in srgb, var(--lbv-color-1) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 25%, transparent);
    border-radius: 6px;
    padding: 3px 8px;
    flex-shrink: 0;
    letter-spacing: 0.06em;
}

.ich-hex-symbol {
    font-size: 1.6rem;
    flex-shrink: 0;
    color: var(--text-primary);
}

.ich-hex-names {
    flex: 1;
}

.ich-hex-names strong {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ich-hex-names small {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.ich-hex-arrow {
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: transform 0.25s;
    flex-shrink: 0;
}

.ich-hex-row.open .ich-hex-arrow {
    transform: rotate(90deg);
}

.ich-hex-body {
    display: none;
    padding: 0 20px 18px;
    border-top: 1px solid var(--border-color);
}

.ich-hex-row.open .ich-hex-body {
    display: block;
}

.ich-hex-body p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-top: 14px;
    margin-bottom: 10px;
}

.ich-hex-body .ich-judgment {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--lbv-color-1);
    padding: 10px 14px;
    border-left: 3px solid var(--lbv-color-1);
    background: color-mix(in srgb, var(--lbv-color-1) 5%, transparent);
    border-radius: 0 8px 8px 0;
    margin-top: 10px;
}

.ich-hex-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.ich-hex-kw {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--lbv-color-1) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 25%, transparent);
    color: var(--lbv-color-1);
    font-weight: 600;
}

/* ========================================================
   COMPONENT 3 — FAQ ACCORDION
======================================================== */
.ich-faq-wrap {
    max-width: 100%;
    margin: 0 auto;
}

.ich-faq-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 600px) {
    .ich-faq-intro {
        grid-template-columns: 1fr;
    }
}

.ich-faq-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 18px 20px;
}

.ich-faq-box h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.ich-faq-box p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.ich-faq-box-icon {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.ich-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ich-faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.ich-faq-item.open {
    border-color: color-mix(in srgb, var(--lbv-color-1) 50%, transparent);
}

.ich-faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.93rem;
    font-weight: 600;
    transition: background 0.2s;
}

.ich-faq-q:hover {
    background: color-mix(in srgb, var(--lbv-color-1) 4%, transparent);
}

.ich-faq-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--lbv-color-1) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 25%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--lbv-color-1);
    font-weight: 900;
    transition: background 0.2s, transform 0.3s;
}

.ich-faq-item.open .ich-faq-icon {
    background: var(--lbv-color-1);
    color: #fff;
    transform: rotate(45deg);
}

[data-theme="dark"] .ich-faq-item.open .ich-faq-icon {
    color: #111;
}

.ich-faq-q-text {
    flex: 1;
}

.ich-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ich-faq-item.open .ich-faq-a {
    max-height: 800px;
}

.ich-faq-a-inner {
    padding: 0 20px 18px 58px;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.ich-faq-a-inner p {
    margin-bottom: 8px;
}

.ich-faq-a-inner p:last-child {
    margin-bottom: 0;
}

.ich-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

@media (max-width: 500px) {
    .ich-compare-grid {
        grid-template-columns: 1fr;
    }
}

.ich-compare-cell {
    background: color-mix(in srgb, var(--lbv-color-1) 5%, transparent);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
}

.ich-compare-cell h5 {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--lbv-color-1);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.ich-compare-cell ul {
    list-style: none;
    padding: 0;
}

.ich-compare-cell ul li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 2px 0;
}

.ich-compare-cell ul li::before {
    content: '·';
    color: var(--lbv-color-1);
    margin-right: 6px;
    font-weight: 900;
}

.ich-faq-tip {
    margin-top: 10px;
    padding: 10px 14px;
    background: color-mix(in srgb, var(--lbv-color-1) 6%, transparent);
    border-left: 3px solid var(--lbv-color-1);
    border-radius: 0 8px 8px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ich-faq-tip strong {
    color: var(--lbv-color-1);
}

/* ========================================================
   HERO BUTTONS (CTA)
======================================================== */
.ich-hero-cta-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    animation: ich-fadeUp 0.7s 0.3s ease-out both;
    margin-top: 25px; /* Thêm một chút khoảng cách với đoạn text bên trên */
}

.ich-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: linear-gradient(135deg, var(--lbv-color-1), var(--lbv-color-2));
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    font-family: inherit;
}

[data-theme="dark"] .ich-btn-primary {
    color: #111;
}

.ich-btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-2px);
    color: #fff;
}

[data-theme="dark"] .ich-btn-primary:hover {
    color: #111;
}

.ich-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: transparent;
    color: var(--lbv-color-1);
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    font-family: inherit;
}

.ich-btn-ghost:hover {
    border-color: var(--lbv-color-1);
    background: color-mix(in srgb, var(--lbv-color-1) 7%, transparent);
    transform: translateY(-2px);
}

/* ========================================================
   RESPONSIVE MOBILE CHO KHỐI HERO
======================================================== */
@media (max-width: 768px) {
    .ich-hero-section {
        min-height: 400px; /* Thu gọn chiều cao lại một chút cho cân đối điện thoại */
        padding: 40px 15px;
    }

    .ich-hero-svg-wrap {
        /* Bỏ 'closest-side' đi, vì trên mobile chiều ngang rất hẹp, dùng closest-side nó sẽ bóp cái mask lại bé xíu. Đổi sang phần trăm tự do để nó bung to ra. */
        -webkit-mask-image: radial-gradient(circle at 50% 50%, black 35%, transparent 85%);
        mask-image: radial-gradient(circle at 50% 50%, black 35%, transparent 85%);
    }
}

/* ========================================================
   COMMENT SECTION — Lời Nhắn & Cảm Nhận
======================================================== */
.ich-btn-comment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 30%, var(--border-color));
    color: var(--lbv-color-1);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    font-family: inherit;
}

.ich-btn-comment:hover,
.ich-btn-comment.active {
    background: color-mix(in srgb, var(--lbv-color-1) 10%, transparent);
    border-color: var(--lbv-color-1);
}

.ich-comment-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.ich-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ich-comment-icon {
    color: var(--lbv-color-1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.ich-comment-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.04em;
}

.ich-comment-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-left: auto;
}

/* ========================================================
   RITUAL STEPPER — Huyền Học Lập Quẻ
======================================================== */
.ich-ritual-steps {
    position: relative;
    padding-left: 0;
}

.ich-ritual-step {
    position: relative;
    padding: 0 0 0 52px;
    margin-bottom: 8px;
}

.ich-ritual-step::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 44px;
    bottom: -8px;
    width: 1px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--lbv-color-1) 30%, transparent), transparent);
}

.ich-ritual-step:last-child::before {
    display: none;
}

.ich-ritual-step-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
}

.ich-ritual-gua {
    position: absolute;
    left: -52px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--lbv-color-1) 10%, var(--card-bg));
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 25%, transparent);
    color: var(--lbv-color-1);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px color-mix(in srgb, var(--lbv-color-1) 12%, transparent);
}

.ich-ritual-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ich-ritual-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-left: auto;
    text-align: right;
}

.ich-ritual-body {
    background: color-mix(in srgb, var(--lbv-color-1) 3%, var(--card-bg));
    border: 1px solid color-mix(in srgb, var(--lbv-color-1) 10%, var(--border-color));
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ich-ritual-em {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-left: 4px;
}

.ich-ritual-highlight {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--lbv-color-1);
    padding: 8px 0 4px;
    word-break: break-all;
}

/* Bước cuối — nổi bật */
.ich-ritual-step-final .ich-ritual-gua {
    background: linear-gradient(135deg, var(--lbv-color-1), var(--lbv-color-2));
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--lbv-color-1) 35%, transparent);
}

.ich-ritual-step-final .ich-ritual-body {
    background: color-mix(in srgb, var(--lbv-color-1) 6%, var(--card-bg));
    border-color: color-mix(in srgb, var(--lbv-color-1) 22%, transparent);
}

/* Kết quả 3 quẻ */
.ich-ritual-result-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ich-ritual-result-item {
    flex: 1 1 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
}

.ich-ritual-result-role {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.ich-ritual-result-name {
    font-size: .875rem;
    font-weight: 700;
    color: var(--lbv-color-1);
}

/* Hào động item */
.ich-logic-item-dynamic {
    border-color: color-mix(in srgb, #ef4444 40%, var(--border-color)) !important;
    background: color-mix(in srgb, #ef4444 6%, var(--card-bg)) !important;
}

.ich-logic-item-dynamic strong {
    color: #ef4444;
}

/* ========================================================
   TOSS SCORE — 6 lần gieo kim tiền
======================================================== */
.ich-toss-score-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ich-toss-score-cell {
    flex: 1 1 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.2s;
}

.ich-toss-score-hao {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ich-toss-score-val {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.ich-toss-score-dynamic {
    border-color: #ef4444 !important;
    background: color-mix(in srgb, #ef4444 8%, var(--card-bg)) !important;
}

.ich-toss-score-dynamic .ich-toss-score-val {
    color: #ef4444;
}

.ich-toss-score-mark {
    font-size: 0.6rem;
    color: #ef4444;
    animation: ich-pulse-glow 1.5s ease-in-out infinite alternate;
}

/* ========================================================
   HAO TABLE — Bảng 6 hào visual
======================================================== */
.ich-hao-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ich-hao-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 0.82rem;
    transition: background 0.15s;
    flex-wrap: wrap;
}

.ich-hao-row:hover {
    background: color-mix(in srgb, var(--lbv-color-1) 4%, var(--card-bg));
}

.ich-hao-row-dynamic {
    background: color-mix(in srgb, #ef4444 7%, var(--card-bg)) !important;
    border-color: color-mix(in srgb, #ef4444 35%, var(--border-color)) !important;
}

.ich-hao-num {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    min-width: 44px;
    flex-shrink: 0;
}

.ich-hao-than {
    font-weight: 700;
    color: var(--lbv-color-1);
    min-width: 72px;
    flex-shrink: 0;
}

.ich-hao-chi {
    color: var(--text-primary);
    flex: 1;
    min-width: 90px;
}

.ich-hao-thu {
    color: var(--text-secondary);
    min-width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.ich-hao-flags {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    min-width: 60px;
    justify-content: flex-end;
}

.ich-flag-the,
.ich-flag-ung,
.ich-flag-dyn {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    letter-spacing: 0.05em;
}

.ich-flag-the {
    background: color-mix(in srgb, #ef4444 12%, transparent);
    color: #ef4444;
    border: 1px solid color-mix(in srgb, #ef4444 30%, transparent);
}

.ich-flag-ung {
    background: color-mix(in srgb, #3b82f6 12%, transparent);
    color: #3b82f6;
    border: 1px solid color-mix(in srgb, #3b82f6 30%, transparent);
}

.ich-flag-dyn {
    background: color-mix(in srgb, #f59e0b 12%, transparent);
    color: #f59e0b;
    border: 1px solid color-mix(in srgb, #f59e0b 30%, transparent);
    animation: ich-pulse-glow 1.5s ease-in-out infinite alternate;
}

.ich-hao-divider {
    text-align: center;
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    opacity: 0.5;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    margin: 4px 0;
}

.ich-hao-table-bien .ich-hao-row {
    opacity: 0.85;
}

/* Responsive */
@media (max-width: 600px) {
    .ich-ritual-step {
        padding-left: 44px;
    }

    .ich-ritual-gua {
        left: -44px;
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .ich-ritual-sub {
        display: none;
    }

    .ich-hao-row {
        font-size: 0.78rem;
    }

    .ich-toss-score-cell {
        flex: 1 1 48px;
        padding: 8px 4px;
    }

    .ich-ritual-result-item {
        flex: 1 1 90px;
    }
}