/* I Ching Consultazione Energetica — Premium v3.2 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&family=Inter:wght@300;400;500;600;700&display=swap');

.iching-wrap {
    --ic-bg: #ffffff;
    --ic-bg2: #f7f5f1;
    --ic-bg3: #f0ede8;
    --ic-dark: #ffffff;
    --ic-dark2: #f7f5f1;
    --ic-blue: #7a5c1e;
    --ic-blue2: #7a5c1e;
    --ic-indigo: #5a3e10;
    --ic-violet: #6b4d1a;
    --ic-red: #c0392b;
    --ic-green: #27804a;
    --ic-amber: #b8860b;
    --ic-gold: #7a5c1e;
    --ic-txt: #2d2a26;
    --ic-txt2: #888078;
    --ic-txt3: #a09888;
    --ic-txt-d: #a09888;
    --ic-brd: #e5e0d8;
    max-width: 1100px;
    width: 96%;
    margin: 0 auto;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    font-size: 20px;
    color: var(--ic-txt);
    background: var(--ic-bg);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    line-height: 1.55;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.02), 0 0 0 1px var(--ic-brd);
}
.iching-wrap::before { display: none; }
.iching-wrap *, .iching-wrap *::before, .iching-wrap *::after { box-sizing: border-box; }

/* ===== HEADER — Gradient hero ===== */
.iching-header {
    background: linear-gradient(160deg, #ffffff 0%, #f7f2eb 40%, #efe8dd 100%);
    padding: 48px 32px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e5e0d8;
}
.iching-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(122,92,30,.06) 0%, transparent 50%);
    pointer-events: none;
}
.iching-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e0d8, transparent);
}
.iching-title {
    position: relative;
    text-align: center;
    color: #2d2a26;
    font-size: 2.6em;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.iching-sub {
    position: relative;
    text-align: center;
    color: #7a5c1e;
    font-size: .95em;
    font-style: normal;
    font-weight: 400;
    margin: 0;
    letter-spacing: .02em;
}

/* ===== STEPS ===== */
.iching-step {
    display: none;
    animation: iching-fi .5s cubic-bezier(.16,1,.3,1);
    position: relative;
}
.iching-step.active { display: block; }
@keyframes iching-fi {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== CARD ===== */
.iching-card {
    background: var(--ic-bg);
    border-radius: 0;
    padding: 32px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--ic-brd);
}
.iching-ct {
    font-size: 1.2em;
    color: var(--ic-txt);
    margin-bottom: 14px;
    font-weight: 600;
    letter-spacing: -.02em;
}
.iching-intro {
    margin-bottom: 14px;
    line-height: 1.6;
    font-size: 1em;
    color: var(--ic-txt2);
}

/* ===== TEXTAREA ===== */
.iching-textarea {
    width: 100%;
    background: var(--ic-bg2);
    border: 1.5px solid transparent;
    color: var(--ic-txt);
    font-family: inherit;
    font-size: .95em;
    padding: 16px 18px;
    border-radius: 14px;
    resize: vertical;
    min-height: 84px;
    outline: none;
    transition: all .25s;
    line-height: 1.5;
}
.iching-textarea:focus {
    border-color: var(--ic-blue);
    background: var(--ic-bg);
    box-shadow: 0 0 0 4px #ece8e2, 0 2px 8px var(--ic-brd);
}
.iching-textarea::placeholder { color: var(--ic-txt3); }

/* ===== WARNING ===== */
.iching-warn { color: var(--ic-red); font-size: .92em; margin-top: 8px; display: none; }

/* ===== BUTTONS — Gradient pill ===== */
.iching-btn {
    display: inline-block;
    background: linear-gradient(135deg, #8b5014 0%, #7a5c1e 50%, #8b5014 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 1em;
    font-weight: 700;
    padding: 16px 36px;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: all .25s cubic-bezier(.16,1,.3,1);
    letter-spacing: -.01em;
    line-height: 1.3;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37,99,235,.25), 0 1px 3px var(--ic-brd);
}
.iching-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37,99,235,.35), 0 2px 6px rgba(0,0,0,.08);
}
.iching-btn:active { transform: translateY(0) scale(.98); }
.iching-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.iching-btn-s {
    background: #f0ede8;
    border: 1.5px solid #d5cfc5;
    color: var(--ic-blue2);
    box-shadow: none;
}
.iching-btn-s:hover {
    background: #ece8e2;
    border-color: #b0a898;
    box-shadow: none;
    transform: translateY(-1px);
}

/* ===== UTILITY ===== */
.iching-tc { text-align: center; }
.iching-mt15 { margin-top: 18px; }
.iching-mt20 { margin-top: 24px; }

/* ===== RITUAL CHECKLIST ===== */
.iching-rit { list-style: none; margin: 0; padding: 0; }
.iching-rit li {
    padding: 0;
    position: relative;
    font-size: 1em;
    line-height: 1.55;
    border-bottom: 1px solid var(--ic-brd);
    color: var(--ic-txt2);
}
.iching-rit li:last-child { border-bottom: none; }
.iching-rit li::before { display: none; }
.iching-rit li strong { color: var(--ic-txt); }
.iching-rit label {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 16px;
    cursor: pointer;
    border-radius: 12px;
    transition: background .2s;
}
.iching-rit label:hover { background: #f5f2ee; }
.iching-rit input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 2px solid #b0a898;
    border-radius: 8px;
    background: #f7f5f1;
    cursor: pointer;
    transition: all .25s cubic-bezier(.16,1,.3,1);
    position: relative;
    margin-top: 2px;
}
.iching-rit input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #8b5014, #7a5c1e);
    border-color: #7a5c1e;
    box-shadow: 0 0 12px #b0a898;
}
.iching-rit input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}
.iching-rit .ic-check-text { flex: 1; }
.iching-rit li.ic-checked { opacity: .5; }
.iching-rit li.ic-checked label { text-decoration: line-through; text-decoration-color: #b0a898; }
.ic-prep-progress {
    margin: 20px 0 8px;
    height: 6px;
    border-radius: 6px;
    background: #e8e4dc;
    overflow: hidden;
}
.ic-prep-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8b5014, #7a5c1e);
    border-radius: 6px;
    transition: width .4s cubic-bezier(.16,1,.3,1);
}
.ic-prep-count {
    text-align: center;
    font-size: .9em;
    color: var(--ic-txt3);
    margin-bottom: 16px;
    font-weight: 500;
}

/* ===== QUESTION TYPE SELECTOR ===== */
.ic-qtype-wrap { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.ic-qtype-opt {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border: 2px solid #e8e4dc;
    border-radius: 14px;
    cursor: pointer;
    transition: all .25s;
    background: #f7f5f1;
}
.ic-qtype-opt:hover { background: #f5f2ee; border-color: #d5cfc5; }
.ic-qtype-opt.ic-selected { border-color: #7a5c1e; background: #f0ede8; box-shadow: 0 0 20px #e8e4dc; }
.ic-qtype-opt input[type="radio"] { display: none; }
.ic-qtype-radio {
    width: 24px; height: 24px; min-width: 24px;
    border: 2px solid #b0a898;
    border-radius: 50%;
    position: relative;
    transition: all .25s;
    margin-top: 2px;
}
.ic-qtype-opt.ic-selected .ic-qtype-radio {
    border-color: #7a5c1e;
    background: linear-gradient(135deg, #8b5014, #7a5c1e);
    box-shadow: 0 0 10px #b0a898;
}
.ic-qtype-opt.ic-selected .ic-qtype-radio::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ffffff;
}
.ic-qtype-text { flex: 1; font-size: 1em; color: var(--ic-txt); line-height: 1.4; font-weight: 500; }
.ic-qtype-free { border-style: dashed; }

/* ===== CAROUSEL (questions + prep) ===== */
/* --- Dati Consultante --- */
.ic-birthdata-wrap {
    margin: 0 0 24px;
    padding: 20px 24px;
    background: #f7f5f2;
    border: 1px solid #e5e0d8;
    border-radius: 16px;
}
.ic-birthdata-fields { display: flex; flex-direction: column; gap: 12px; }
.ic-birthdata-row { display: flex; flex-direction: column; gap: 4px; }
.ic-bd-row-split { flex-direction: row; gap: 14px; }
.ic-bd-label {
    font-size: .85em;
    font-weight: 600;
    color: #8a6c2e;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ic-bd-input {
    width: 100%;
    padding: 10px 14px;
    background: #faf8f5;
    border: 1px solid #e0dbd3;
    border-radius: 10px;
    color: #2d2a26;
    font-size: .95em;
    font-family: inherit;
    transition: border-color .25s;
    box-sizing: border-box;
}
.ic-bd-input:focus {
    outline: none;
    border-color: #a09888;
    box-shadow: 0 0 0 3px #ece8e2;
}
.ic-bd-input::placeholder { color: #b0a898; }
.ic-bd-input[type="date"] { color-scheme: dark; }
.ic-bd-input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.7) sepia(.5) hue-rotate(5deg); }
@media(max-width:600px){
    .ic-bd-row-split { flex-direction: column; gap: 12px; }
}

/* --- Intestazione consultante nei risultati --- */
.ic-consultee-header {
    text-align: center;
    padding: 16px 20px;
    margin-bottom: 16px;
    background: #f5f2ee;
    border: 1px solid #e8e4dc;
    border-radius: 14px;
}
.ic-consultee-name {
    font-size: 1.15em;
    font-weight: 700;
    color: #2d2a26;
}
.ic-consultee-meta {
    font-size: .9em;
    color: #989088;
    margin-top: 4px;
}

.ic-carousel-counter {
    text-align: center;
    font-size: 1em;
    font-weight: 600;
    color: #7a5c1e;
    margin-bottom: 10px;
    padding: 8px 16px;
    background: #f5f2ee;
    border: 1px solid #ece8e2;
    border-radius: 10px;
}
.ic-carousel { margin: 16px 0; }
.ic-carousel-stage {
    position: relative;
    overflow: hidden;
    min-height: 180px;
}
.ic-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity .4s ease, transform .4s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    background: #f7f5f1;
    border: 2px solid #ece8e2;
    border-radius: 20px;
}
.ic-carousel-slide.ic-slide-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
}
.ic-carousel-slide.ic-slide-selected {
    border-color: #7a5c1e;
    background: #f0ede8;
    box-shadow: 0 0 24px #e5e0d8;
}
.ic-carousel-slide.ic-slide-done {
    border-color: rgba(74,222,128,.3);
    background: rgba(74,222,128,.04);
}
.ic-slide-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #e8e4dc;
    color: #7a5c1e;
    font-weight: 700;
    font-size: .95em;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.ic-slide-title {
    font-size: 1.25em;
    font-weight: 700;
    color: #2d2a26;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 10px;
}
.ic-slide-desc {
    font-size: .95em;
    color: #5d5550;
    text-align: center;
    line-height: 1.6;
    max-width: 480px;
}
.ic-slide-img {
    width: 180px;
    height: 180px;
    border-radius: 20px;
    object-fit: cover;
    border: 1px solid #e0dbd3;
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
    margin-bottom: 16px;
}
.ic-slide-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    cursor: pointer;
    font-size: .95em;
    color: #8a6c2e;
    user-select: none;
}
.ic-slide-check input[type="checkbox"] {
    width: 22px; height: 22px;
    accent-color: #7a5c1e;
    cursor: pointer;
    flex-shrink: 0;
}
.ic-slide-btn {
    margin-top: 16px;
    padding: 12px 28px;
    border: 2px solid #7a5c1e;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139,80,20,.3), #e0dbd3);
    color: #2d2a26;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    transition: all .25s;
}
.ic-slide-btn:hover { background: linear-gradient(135deg, rgba(139,80,20,.5), #c0b8a8); box-shadow: 0 0 16px #d5cfc5; }
.ic-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
}
.ic-carousel-arrow {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid #b0a898;
    background: #ece8e2;
    color: #7a5c1e;
    font-size: 1.3em;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ic-carousel-arrow:hover { background: #e0dbd3; border-color: #9a7c3e; box-shadow: 0 0 12px #e0dbd3; }
.ic-carousel-arrow:disabled { opacity: .2; cursor: default; }
.ic-carousel-dots {
    display: flex;
    gap: 10px;
    align-items: center;
}
.ic-carousel-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #d5cfc5;
    border: 2px solid #e0dbd3;
    cursor: pointer;
    transition: all .3s;
}
.ic-carousel-dot.ic-dot-active {
    background: #7a5c1e;
    border-color: #7a5c1e;
    box-shadow: 0 0 10px #9a7c3e;
    transform: scale(1.3);
}
.ic-carousel-dot.ic-dot-done {
    background: #27804a;
    border-color: rgba(74,222,128,.3);
}
@media(max-width:600px){
    .ic-slide-title { font-size: 1.1em; }
    .ic-slide-img { width: 140px; height: 140px; }
    .ic-carousel-slide { padding: 18px 14px; }
}

/* ===== QUESTION SHOW ===== */
.iching-qshow {
    text-align: center;
    font-style: italic;
    color: var(--ic-txt);
    margin: 14px 0;
    padding: 16px 24px;
    background: linear-gradient(135deg, #f5f2ee 0%, rgba(139,80,20,.04) 100%);
    border: 1px solid #ece8e2;
    border-radius: 14px;
    font-size: .95em;
}

/* ===== TOSS AREA — GAME SCALE ===== */
.iching-toss-area { text-align: center; padding: 32px 0; }
.iching-toss-ct {
    font-size: 1.3em;
    color: var(--ic-txt);
    margin-bottom: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,.05);
}

/* ===== COIN BUTTON — HUGE Bronze Chinese coin ===== */
.iching-coin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 35%, #e8c66a 0%, #7a5c1e 25%, #a07b2e 55%, #7a5c1e 80%, #5a4210 100%);
    border: 5px solid #8a6914;
    cursor: pointer;
    transition: all .3s cubic-bezier(.16,1,.3,1);
    transform-style: preserve-3d;
    box-shadow: 0 12px 40px rgba(90,66,16,.5), inset 0 3px 6px rgba(255,220,130,.35), inset 0 -3px 6px rgba(0,0,0,.05), 0 0 0 3px rgba(138,105,20,.3);
    position: relative;
}
.iching-coin-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 18px 50px rgba(90,66,16,.6), inset 0 3px 6px rgba(255,220,130,.45), 0 0 0 3px rgba(138,105,20,.5), 0 0 40px #e0dbd3;
}
.iching-coin-btn:active { transform: scale(.92) rotate(-3deg); }
/* Disable hover/active transform when animating */
.iching-coin-btn.ic-animating,
.iching-coin-btn.ic-animating:hover,
.iching-coin-btn.ic-animating:active {
    transition: none !important;
}
.iching-coin-txt {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.4em;
    color: #3d2e08;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-shadow: 0 1px 0 rgba(232,198,106,.5);
}
.iching-coin-btn.iching-spin {
    animation: iching-sc .6s cubic-bezier(.22,.61,.36,1);
}
@keyframes iching-sc {
    0%   { transform: rotateY(0) scale(1); }
    25%  { transform: rotateY(180deg) scale(.8) translateY(-20px); }
    50%  { transform: rotateY(360deg) scale(.75) translateY(-30px); }
    75%  { transform: rotateY(540deg) scale(.85) translateY(-10px); }
    100% { transform: rotateY(720deg) scale(1) translateY(0); }
}

/* ===== COIN RESULT — Mini Chinese coins ===== */
.iching-coin-res { display: flex; gap: 16px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.iching-cs {
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Noto Serif SC', serif; font-size: 1em; font-weight: 700;
    transition: all .3s;
    position: relative;
}
.iching-cs::after {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(0,0,0,.03);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.05);
    pointer-events: none;
}
.iching-cs-h {
    background: radial-gradient(circle at 35% 30%, #e8c66a 0%, #7a5c1e 40%, #8a6914 100%);
    color: #3d2e08;
    border: 2.5px solid #a07b2e;
    box-shadow: 0 3px 10px rgba(90,66,16,.35), inset 0 1px 2px rgba(255,220,130,.3);
    text-shadow: 0 1px 0 rgba(232,198,106,.4);
}
.iching-cs-t {
    background: radial-gradient(circle at 35% 30%, #d4b76a 0%, #a89060 40%, #6d5a3a 100%);
    color: #2a1f0a;
    border: 2.5px solid #8a7850;
    box-shadow: 0 3px 10px rgba(90,66,16,.25), inset 0 1px 2px rgba(200,180,130,.2);
    text-shadow: 0 1px 0 rgba(180,160,110,.3);
}

/* ===== LINES — GAME SCALE ===== */
.iching-lines-d { display: flex; flex-direction: column-reverse; align-items: center; gap: 9px; margin: 24px 0; }
.iching-lr { display: flex; align-items: center; gap: 10px; animation: iching-si .4s cubic-bezier(.16,1,.3,1); }
@keyframes iching-si {
    from { opacity: 0; transform: translateX(-16px) scale(.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
.iching-ll { width: 26px; text-align: right; font-size: 1em; color: var(--ic-txt3); font-weight: 700; }
.iching-lv { display: flex; align-items: center; height: 14px; }
.iching-ls { height: 9px; border-radius: 5px; }
.iching-yang .iching-ls { width: 130px; background: linear-gradient(90deg, #1e293b, #334155); }
.iching-yin .iching-ls  { width: 55px;  background: linear-gradient(90deg, #1e293b, #334155); }
.iching-yin .iching-lg  { width: 18px; }
.iching-li2 { font-size: .95em; margin-left: 8px; color: var(--ic-txt2); font-weight: 500; }

/* ===== QUADRANTS ===== */
.iching-quads { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0; padding: 28px 24px; background: var(--ic-bg2); }
@media (max-width: 600px) { .iching-quads { grid-template-columns: 1fr; padding: 20px; } }
.iching-quad {
    background: linear-gradient(145deg, #f5f2ee 0%, #f5f2ee 100%);
    border: 2px solid #d5cfc5;
    border-radius: 18px;
    padding: 24px 20px;
    min-height: 220px;
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
    transition: box-shadow .2s, transform .2s;
    position: relative;
    overflow: hidden;
}
.iching-quad::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
    pointer-events: none;
    border-radius: 18px;
}
.iching-quad:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,.08), 0 0 0 1px var(--ic-brd);
    transform: translateY(-2px);
}
.iching-quad.iching-empty {
    opacity: .3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: var(--ic-txt3);
}
.iching-quad.iching-empty:hover { transform: none; box-shadow: 0 2px 12px var(--ic-brd), 0 0 0 1px var(--ic-brd); }

/* Quadrant content — parchment style */
.iching-qt { font-size: .95em; color: #8a7e6a; text-align: center; margin-bottom: 5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; position: relative; }
.iching-hn { text-align: center; font-size: 1.6em; font-weight: 700; color: #1a1a1a; font-family: 'Noto Serif SC', serif; position: relative; }
.iching-hname { text-align: center; font-size: 1.05em; color: #3d3020; margin-bottom: 10px; position: relative; font-weight: 600; }
.iching-htri { text-align: center; font-size: .92em; color: #6d5a3a; margin-bottom: 14px; position: relative; }
.iching-ql { display: flex; flex-direction: column-reverse; align-items: center; gap: 5px; position: relative; }
.iching-qlr { display: flex; align-items: center; gap: 5px; }
.iching-qln { width: 16px; font-size: .85em; text-align: right; color: #8a7e6a; font-weight: 700; }
.iching-qlv { display: flex; align-items: center; height: 10px; }
.iching-qy { width: 80px; height: 7px; border-radius: 4px; }
.iching-qi { width: 34px; height: 7px; border-radius: 4px; }
.iching-qg { width: 10px; }
/* All lines black by default */
.iching-ql-black { background: #1a1a1a !important; }
/* Keep conf/nconf for backward compat but not used in quadrants anymore */
.iching-conf { background-color: #1a1a1a !important; }
.iching-nconf { background-color: #1a1a1a !important; }
.iching-mm { font-size: .78em; margin-left: 3px; font-weight: 700; color: #c93400; }

/* ===== ZEN INTERPRETATION ===== */
.ic-zen-sec {
    padding: 36px 30px;
    border-bottom: 1px solid var(--ic-brd);
    background: var(--ic-bg);
}
.ic-zen-h3 {
    font-size: 1.35em;
    font-weight: 700;
    color: var(--ic-gold);
    letter-spacing: -.02em;
    margin: 0 0 10px;
    line-height: 1.2;
    text-transform: uppercase;
    font-style: italic;
}
.ic-zen-intro {
    font-size: 1em;
    color: var(--ic-txt2);
    line-height: 1.6;
    margin: 0 0 24px;
}
.ic-zen-block {
    padding: 22px 0;
    border-bottom: 1px solid var(--ic-brd);
}
.ic-zen-block:last-child { border-bottom: none; }
.ic-zen-label {
    font-size: 1.08em;
    font-weight: 700;
    color: var(--ic-txt);
    margin-bottom: 6px;
    line-height: 1.3;
}
.ic-zen-p {
    font-size: 1em;
    color: #3d3530;
    line-height: 1.65;
    margin: 4px 0;
}
.ic-zen-meta {
    font-size: .95em;
    color: var(--ic-txt2);
    line-height: 1.5;
    margin: 6px 0;
}
.ic-zen-line {
    padding: 24px 0;
    border-bottom: 1px solid var(--ic-brd);
}
.ic-zen-line:last-child { border-bottom: none; }
.ic-zen-line-head { margin-bottom: 8px; line-height: 1.4; }
.ic-zen-line-title {
    font-size: 1.08em;
    font-weight: 700;
    color: var(--ic-txt);
}
.ic-zen-nc {
    font-size: .95em;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: .03em;
}
.ic-zen-mut {
    font-size: .95em;
    font-weight: 600;
    color: #b8860b;
    letter-spacing: .03em;
}
.ic-zen-bach {
    font-size: .95em;
    color: #4d4540;
    line-height: 1.55;
    margin: 6px 0 0;
}
/* Rimedi con icone */
.ic-rem-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0;
    font-size: .95em;
    color: #4d4540;
    line-height: 1.55;
}
.ic-rem-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 16px;
}
/* Citazioni saggi */
.ic-zen-quote {
    display: block;
    margin: 12px 0 4px;
    padding: 10px 16px;
    border-left: 3px solid var(--ic-gold);
    background: #f0ede8;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--ic-gold);
    font-size: .95em;
    line-height: 1.5;
    opacity: .85;
}
/* Codice binario */
.ic-zen-binary {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: .85em;
    color: var(--ic-gold);
    background: #e8e4dc;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: .15em;
    margin-left: 6px;
}
/* Hex card */
.ic-zen-hex-card {
    background: #f5f2ee;
    border: 1px solid #e5e0d8;
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0;
}
.ic-zen-hex-card h4 {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--ic-txt);
    margin: 0 0 12px;
    line-height: 1.3;
}
.ic-zen-summary {
    font-size: 1.05em;
    font-weight: 600;
    color: var(--ic-txt);
    padding: 14px 0;
    cursor: pointer;
    border-bottom: 1px solid var(--ic-brd);
}
.ic-zen-summary:hover { color: var(--ic-gold); }
.ic-zen-detail { padding: 16px 0; }

/* OLD classes kept for backward compat - now unused */
.iching-isec {
    background: var(--ic-bg);
    border: none;
    border-radius: 0;
    padding: 28px 32px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--ic-brd);
}
.iching-ist {
    font-size: 1.05em;
    color: var(--ic-txt);
    margin-bottom: 14px;
    font-weight: 700;
    letter-spacing: -.02em;
}
.iching-tcard {
    background: linear-gradient(135deg, #f5f2ee 0%, rgba(139,80,20,.03) 100%);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 10px;
    border-left: 3px solid;
    border-image: linear-gradient(180deg, #8b5014, #7a5c1e) 1;
}
.iching-tcard-t { color: var(--ic-txt); font-weight: 600; margin-bottom: 4px; font-size: .91em; }
.iching-bcard {
    background: var(--ic-bg2);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-left: 3px solid;
}
.iching-bc-c { border-left-color: var(--ic-green); background: linear-gradient(135deg, rgba(34,197,94,.04) 0%, rgba(34,197,94,.01) 100%); }
.iching-bc-n { border-left-color: var(--ic-red); background: linear-gradient(135deg, rgba(239,68,68,.04) 0%, rgba(239,68,68,.01) 100%); }
.iching-bcard-t { font-weight: 600; margin-bottom: 4px; font-size: .9em; }

/* ===== DISCLAIMER ===== */
.iching-disclaimer {
    background: var(--ic-bg2);
    border: none;
    border-radius: 14px;
    padding: 16px 20px;
    margin: 24px 32px;
    font-size: .9em;
    color: var(--ic-txt3);
    text-align: center;
    line-height: 1.55;
}

/* ===== BOTTOM ACTION BAR ===== */
.iching-actions-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 28px 32px 40px;
    margin-top: 8px;
}

/* ===== DETAILS ===== */
.iching-wrap details { margin-bottom: 8px; }
.iching-wrap details summary { cursor: pointer; color: var(--ic-blue); font-weight: 500; font-size: .93em; padding: 6px 0; }
.iching-wrap details summary:hover { color: var(--ic-blue2); }

/* ===== TAGS ===== */
.iching-tag { display: inline-block; padding: 4px 14px; border-radius: 980px; font-size: .95em; font-weight: 700; margin-right: 4px; }
.iching-tag-y { background: rgba(34,197,94,.08); color: #16a34a; }
.iching-tag-n { background: rgba(239,68,68,.08); color: #dc2626; }
.iching-tag-m { background: rgba(245,158,11,.08); color: #d97706; }

.iching-wrap hr { border: none; border-top: 1px solid var(--ic-brd); margin: 0; }

/* ===== GATE / PAYWALL ===== */
.iching-gate {
    text-align: center;
    padding: 56px 32px 48px;
    background: linear-gradient(180deg, #f7f5f2 0%, transparent 100%);
}
.iching-gate-icon {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: .5;
    animation: iching-pulse 3s ease-in-out infinite;
}
@keyframes iching-pulse {
    0%, 100% { opacity: .4; transform: scale(1); }
    50% { opacity: .65; transform: scale(1.04); }
}
.iching-gate-title {
    font-size: 1.5em;
    color: var(--ic-txt);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -.02em;
}
.iching-gate-text { font-size: .93em; color: var(--ic-txt2); line-height: 1.6; max-width: 480px; margin: 0 auto 12px; }
.iching-gate-price { font-size: 2.2em; font-weight: 700; color: var(--ic-txt); margin: 16px 0; letter-spacing: -.03em; }

/* Code section */
.iching-gate-code-section { margin-top: 28px; max-width: 400px; margin-left: auto; margin-right: auto; }
.iching-gate-divider { position: relative; text-align: center; margin: 24px 0; }
.iching-gate-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--ic-brd); }
.iching-gate-divider span { position: relative; background: var(--ic-bg); padding: 0 16px; color: var(--ic-txt3); font-size: .92em; }
.iching-gate-code-label { font-size: .95em; color: var(--ic-txt2); margin-bottom: 10px; }
.iching-gate-code-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.iching-code-input {
    background: var(--ic-bg2); border: 1.5px solid transparent; color: var(--ic-txt);
    font-family: inherit; font-size: .93em; padding: 13px 16px; border-radius: 14px;
    outline: none; text-transform: uppercase; letter-spacing: .06em; width: 220px; text-align: center;
    transition: all .25s;
}
.iching-code-input:focus { border-color: var(--ic-blue); background: var(--ic-bg); box-shadow: 0 0 0 4px #ece8e2; }
.iching-gate-code-msg { margin-top: 10px; font-size: .92em; min-height: 1.4em; }
.iching-gate-code-msg.iching-msg-ok { color: var(--ic-green); }
.iching-gate-code-msg.iching-msg-err { color: var(--ic-red); }

/* Limit badge */
.iching-limit-badge {
    text-align: center; padding: 16px 24px;
    background: #0d0b08;
    border: 1px solid #c0b8a8;
    border-radius: 16px; font-size: .95em; color: var(--ic-txt2); margin: 0 32px 12px; font-weight: 500;
}

/* Credit pill — top-right compact */
.ic-credit-pill {
    position: sticky; top: 0; z-index: 120; float: right;
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; margin: 12px 14px 0 0;
    max-width: none; width: auto;
    border-radius: 980px;
    background: #ffffff;
    border: 1px solid #d5cfc5;
    backdrop-filter: blur(12px);
    cursor: pointer; font-size: .88em; line-height: 1;
    transition: box-shadow .25s ease, border-color .25s ease;
}
.ic-credit-pill:hover {
    border-color: #a09888;
    box-shadow: 0 4px 20px rgba(139,80,20,.25);
}
.ic-topup-dropdown {
    position: absolute; top: 48px; right: 14px; z-index: 121;
    background: #ffffff;
    border: 1px solid #c0b8a8;
    border-radius: 16px; padding: 16px 18px; min-width: 200px;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0,0,0,.1);
}
@media (max-width: 600px) {
    .ic-credit-pill { padding: 6px 10px; gap: 6px; font-size: .82em; margin: 8px 8px 0 0; }
    .ic-topup-dropdown { right: 8px; min-width: 180px; padding: 14px; }
}

/* Email badge */
.iching-email-badge {
    text-align: center; padding: 14px; margin: 20px 32px;
    background: linear-gradient(135deg, rgba(34,197,94,.06) 0%, rgba(34,197,94,.02) 100%);
    border: 1px solid rgba(34,197,94,.1);
    border-radius: 14px; font-size: .95em; color: #16a34a; font-weight: 500;
}

/* ===== OVERLAY & SCHEDE ===== */
.iching-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(10,10,26,.5);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    display: none; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 24px;
}
.iching-overlay-inner { max-width: 960px; width: 96%; margin: auto; }
.iching-overlay-loading, .iching-overlay-err {
    color: var(--ic-txt); text-align: center; padding: 60px 20px; font-size: 1.1em;
    background: var(--ic-bg); border-radius: 24px; box-shadow: 0 25px 50px rgba(0,0,0,.02);
}
.iching-overlay-err .iching-btn { margin-top: 20px; }

.iching-scheda {
    background: var(--ic-bg);
    color: var(--ic-txt);
    border-radius: 24px;
    overflow: hidden;
    font-family: inherit;
    font-size: 18px;
    box-shadow: 0 25px 60px rgba(0,0,0,.03);
}
.iching-scheda-head {
    background: linear-gradient(160deg, #ffffff 0%, #f7f2eb 40%, #efe8dd 100%);
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e5e0d8;
}
.iching-scheda-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(122,92,30,.06) 0%, transparent 50%);
    pointer-events: none;
}
.iching-scheda-close {
    position: absolute; top: 14px; right: 18px;
    background: rgba(0,0,0,.06); border: 1px solid #e5e0d8;
    color: #5d5550; font-size: 1.3em; cursor: pointer; width: 38px; height: 38px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.iching-scheda-close:hover { background: rgba(0,0,0,.1); }
.iching-scheda-label { position: relative; font-size: .95em; text-transform: uppercase; letter-spacing: 3px; color: #9a7c3e; margin-bottom: 8px; }
.iching-scheda-title { position: relative; font-size: 1.8em; margin: 0 0 8px; color: #2d2a26; font-weight: 700; letter-spacing: -.02em; }
.iching-scheda-sub { position: relative; font-size: 1em; color: #9a7c3e; }
.iching-scheda-hex {
    position: relative;
    font-family: 'SF Mono', 'Fira Code', monospace; font-size: 1em; line-height: 1.4;
    color: #7a5c1e; margin: 16px auto 0; text-align: left; display: inline-block; white-space: pre;
    background: transparent !important; border: none !important; box-shadow: none !important; padding: 10px !important;
}

.iching-scheda-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; padding: 24px 30px; }
.iching-scheda-card { background: #f5f2ee; border: 1px solid #e5e0d8; border-radius: 16px; padding: 22px; }
.iching-scheda-card-t { font-weight: 700; color: #7a5c1e; margin-bottom: 10px; font-size: 1em; text-transform: uppercase; letter-spacing: .05em; }
.iching-scheda-card ul { list-style: none; padding: 0; margin: 0; }
.iching-scheda-card li { font-size: 1em; line-height: 1.7; padding: 4px 0 4px 16px; position: relative; color: #3d3530; }
.iching-scheda-card li::before { content: ''; position: absolute; left: 0; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: #7a5c1e; opacity: .4; }

.iching-scheda-mtc { padding: 26px 30px; background: #f7f5f2; border-top: 1px solid #e8e4dc; }
.iching-scheda-mtc-t { font-weight: 700; color: #7a5c1e; margin-bottom: 14px; font-size: 1.1em; }
.iching-scheda-mtc-row { font-size: 1em; line-height: 1.7; margin-bottom: 12px; color: #3d3530; }

.iching-scheda-percorso { padding: 26px 30px; border-top: 1px solid #e8e4dc; }
.iching-scheda-percorso p { font-size: 1em; line-height: 1.7; margin: 0 0 12px; color: #3d3530; }
.iching-scheda-pnote { font-style: italic; color: #7a5c1e; border-left: 3px solid #7a5c1e; padding-left: 14px; }

.iching-scheda-conf { padding: 18px 30px; font-size: 1em; color: #7a5c1e; border-top: 1px solid #e8e4dc; }

.iching-region-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 30px; border-top: 1px solid #e8e4dc; }
.iching-region-btn {
    background: #f5f2ee; border: 1.5px solid #e0dbd3; color: #3d3530;
    padding: 10px 20px; border-radius: 980px; cursor: pointer; font-size: .95em;
    font-weight: 500; transition: all .2s; font-family: inherit;
}
.iching-region-btn:hover, .iching-region-btn.active {
    background: linear-gradient(135deg, #8b5014, #7a5c1e);
    color: #fff; border-color: transparent;
    box-shadow: 0 4px 12px #c0b8a8;
}

.iching-point-card { margin: 0 30px 14px; background: #f7f5f2; border: 1px solid #ece8e2; border-radius: 16px; overflow: hidden; }
.iching-point-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.iching-point-id {
    color: #fff; font-weight: 700; font-size: 1em; padding: 6px 12px; border-radius: 8px;
    min-width: 38px; text-align: center;
    background: linear-gradient(135deg, #7a5c1e, #8b6d2e);
}
.iching-point-name { font-weight: 600; font-size: 1em; flex: 1; color: #2d2a26; }
.iching-point-me { font-style: italic; font-size: 1em; color: #7a5c1e; width: 100%; margin-left: 50px; }

.iching-point-body { padding: 0 20px 20px; }
.iching-point-meta { font-size: 1em; color: #3d3530; margin-bottom: 10px; }
.iching-point-conf { font-size: 1em; padding: 10px 16px; border-radius: 12px; margin-bottom: 10px; font-weight: 500; }
.iching-point-conf.conf  { background: #f0ede8; color: #7a5c1e; border: 1px solid #e8e4dc; }
.iching-point-conf.nconf { background: rgba(200,60,60,.08); color: #c94040; border: 1px solid rgba(200,60,60,.1); }
.iching-point-bach { font-size: 1em; color: #d97706; margin-bottom: 12px; }
.iching-point-sp { font-weight: 600; font-size: 1em; margin-bottom: 10px; color: #2d2a26; }
.iching-point-mtc { list-style: none; padding: 0; margin: 0 0 12px; }
.iching-point-mtc li { font-size: 1em; line-height: 1.65; padding: 4px 0 4px 18px; position: relative; color: #3d3530; }
.iching-point-mtc li::before { content: ''; position: absolute; left: 2px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: #7a5c1e; opacity: .4; }
.iching-point-sy { font-size: .95em; line-height: 1.6; color: #3d3530; margin-bottom: 12px; font-style: italic; }
.iching-point-judg { background: #f7f5f2; border-radius: 14px; padding: 18px; margin-top: 12px; border: 1px solid #e8e4dc; }
.iching-point-jt { font-size: 1em; font-weight: 700; margin-bottom: 8px; color: #7a5c1e; }
.iching-point-js { font-size: 1em; line-height: 1.65; color: #3d3530; }

.iching-btn-scheda {
    background: linear-gradient(135deg, #8b5014, #7a5c1e);
    color: #fff; font-weight: 600; border: none;
    padding: 11px 24px; border-radius: 980px; cursor: pointer; font-size: .95em;
    margin: 14px 0; transition: all .2s; font-family: inherit;
    box-shadow: 0 4px 14px #d5cfc5;
}
.iching-btn-scheda:hover { transform: translateY(-2px); box-shadow: 0 8px 25px #b0a898; }

/* ===== RESPONSIVE ===== */
/* Large screens — scale up */
@media (min-width: 1400px) {
    .iching-wrap { font-size: 21px; max-width: 1200px; }
}
@media (min-width: 1800px) {
    .iching-wrap { font-size: 22px; max-width: 1300px; }
}
/* Mobile */
@media (max-width: 600px) {
    .iching-wrap { width: 100%; border-radius: 0; box-shadow: none; font-size: 18px; }
    .iching-header { padding: 36px 20px 32px; }
    .iching-title { font-size: 1.9em; }
    .iching-card { padding: 24px 20px; }
    .iching-overlay { padding: 10px; }
    .iching-scheda { border-radius: 20px; }
    .iching-scheda-head { padding: 28px 20px; }
    .iching-scheda-title { font-size: 1.4em; }
    .iching-scheda-cards { grid-template-columns: 1fr; padding: 16px 20px; }
    .iching-point-card { margin: 0 16px 12px; }
    .iching-point-head { padding: 14px 16px; }
    .iching-point-body { padding: 0 16px 16px; }
    .iching-point-me { margin-left: 0; }
    .iching-region-bar { padding: 14px 16px; }
    .iching-coin-btn { width: 130px; height: 130px; }
    .iching-coin-txt { font-size: .95em; }
    .iching-isec { padding: 24px 20px; }
    .iching-quads { padding: 16px 20px; }
    .iching-disclaimer { margin: 20px 20px; }
    .iching-actions-bar { padding: 20px 20px 32px; gap: 12px; }
    .iching-actions-bar .iching-btn { padding: 14px 24px; font-size: .92em; }
    .iching-rit label { padding: 14px 12px; gap: 12px; }
    .iching-rit input[type="checkbox"] { width: 24px; height: 24px; min-width: 24px; }
}

/* =========================================================
   GLOSSARIO I CHING
   ========================================================= */
.ic-glossary-wrap {
  margin: 0 0 24px;
}
.ic-glossary-details {
  background: #f7f5f1;
  border: 1px solid #e5e0d8;
  border-radius: 16px;
  overflow: hidden;
}
.ic-glossary-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  color: #7a5c1e;
  font-weight: 700;
  font-size: 1em;
  cursor: pointer;
  user-select: none;
  letter-spacing: .03em;
}
.ic-glossary-toggle:hover {
  background: #f5f2ee;
}
.ic-glossary-arrow {
  font-size: .7em;
  transition: transform .25s;
  display: inline-block;
}
.ic-glossary-details[open] .ic-glossary-arrow {
  transform: rotate(90deg);
}
.ic-glossary-body {
  padding: 0 20px 20px;
  border-top: 1px solid #ece8e2;
}
.ic-glossary-intro {
  font-size: .92em;
  color: #989088;
  line-height: 1.5;
  margin: 14px 0 16px;
  font-style: italic;
}
.ic-glossary-item {
  padding: 10px 0;
  border-bottom: 1px solid #f2efea;
}
.ic-glossary-item:last-child {
  border-bottom: none;
}
.ic-glossary-term {
  font-weight: 700;
  color: #2d2a26;
  font-size: .95em;
  margin-bottom: 4px;
}
.ic-glossary-def {
  font-size: .9em;
  color: #888078;
  line-height: 1.55;
}

/* =========================================================
   PARAFRASI INLINE (ic-para)
   ========================================================= */
.ic-para {
  font-style: italic;
  padding-left: 12px;
  border-left: 2px solid #e0dbd3;
  margin-top: 4px !important;
}

/* =========================================================
   CODICE BINARIO — Badge cliccabile + Spiegazione espandibile
   ========================================================= */
.ic-binary-toggle {
  cursor: pointer;
  position: relative;
}
.ic-binary-toggle:hover {
  background: #d5cfc5;
}
.ic-binary-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  background: #8a6c2e;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
}
.ic-binary-detail {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
}
.ic-binary-explain {
  background: #faf8f5;
  border: 1px solid #e5e0d8;
  border-radius: 14px;
  padding: 18px 20px;
}
.ic-binary-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ic-binary-bit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 1.4em;
  font-weight: 700;
  min-width: 38px;
  text-align: center;
}
.ic-bit-yang {
  background: #e5e0d8;
  color: #7a5c1e;
}
.ic-bit-yin {
  background: rgba(100,80,60,.12);
  color: #989088;
}
.ic-bit-label {
  font-size: .5em;
  font-weight: 400;
  opacity: .7;
  font-family: inherit;
}
.ic-binary-sep {
  width: 12px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c0b8a8;
  font-size: .8em;
}
.ic-binary-tri {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #f5f2ee;
  border-radius: 10px;
  flex-wrap: wrap;
}
.ic-binary-tri span {
  font-size: .88em;
  color: #5d5550;
  font-weight: 500;
}
.ic-binary-desc {
  font-size: .95em;
  color: #2d2a26;
  line-height: 1.5;
  margin-bottom: 8px;
  font-weight: 500;
}
.ic-binary-note {
  font-size: .82em;
  color: #a09888;
  line-height: 1.5;
  font-style: italic;
  padding-top: 8px;
  border-top: 1px solid #f0ede8;
}

/* Mobile responsive for binary */
@media (max-width: 600px) {
  .ic-binary-bit { padding: 5px 7px; font-size: 1.2em; min-width: 32px; }
  .ic-binary-tri { flex-direction: column; gap: 4px; }
  .ic-glossary-toggle { font-size: .92em; padding: 14px 16px; }
  .ic-glossary-body { padding: 0 16px 16px; }
  .ic-binary-explain { padding: 14px 16px; }
}

/* =========================================================
   INTERPRETAZIONE AI PERSONALIZZATA — 3 Livelli
   ========================================================= */
.ic-ai-wrap {
  margin-top: 30px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(139,92,246,.2);
  background: #faf8f5;
}
.ic-ai-header {
  background: linear-gradient(135deg, rgba(139,92,246,.12) 0%, #ece8e2 100%);
  padding: 24px 28px;
  border-bottom: 1px solid rgba(139,92,246,.12);
  text-align: center;
}
.ic-ai-title {
  font-size: 1.15em;
  font-weight: 700;
  color: #7a5c1e;
  letter-spacing: .03em;
  margin-bottom: 6px;
}
.ic-ai-subtitle {
  font-size: .9em;
  color: #989088;
  font-style: italic;
}

/* Loading */
.ic-ai-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 20px;
}
.ic-ai-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0dbd3;
  border-top-color: #7a5c1e;
  border-radius: 50%;
  animation: ic-ai-spin 1s linear infinite;
}
@keyframes ic-ai-spin {
  to { transform: rotate(360deg); }
}
.ic-ai-loading-text {
  font-size: .92em;
  color: #9a7c3e;
  font-style: italic;
  letter-spacing: .05em;
}

/* Error */
.ic-ai-error {
  padding: 16px 24px;
  font-size: .92em;
  color: #c94040;
  text-align: center;
  font-style: italic;
}

/* Levels */
.ic-ai-level {
  border-top: 1px solid #f0ede8;
}
.ic-ai-level-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px 0;
}
.ic-ai-level-icon {
  flex-shrink: 0;
}
.ic-ai-level-title {
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: .03em;
}
.ic-ai-level-body {
  padding: 12px 24px 20px;
}
.ic-ai-level-body p {
  font-size: .95em;
  line-height: 1.65;
  margin: 0 0 10px;
}
.ic-ai-level-body p:last-child {
  margin-bottom: 0;
}

/* Livello 1 — Chiaro ☀️ */
.ic-ai-lv-chiaro .ic-ai-level-title {
  color: #2d2a26;
}
.ic-ai-lv-chiaro .ic-ai-level-body p {
  color: #4d4540;
}

/* Livello 2 — Profondo 🌊 */
.ic-ai-lv-profondo {
  background: rgba(139,92,246,.03);
}
.ic-ai-lv-profondo .ic-ai-level-title {
  color: #a78bfa;
}
.ic-ai-lv-profondo .ic-ai-level-body p {
  color: #5d5550;
}

/* Livello 3 — Esoterico 🔮 */
.ic-ai-lv-esoterico {
  background: linear-gradient(180deg, rgba(139,92,246,.06) 0%, #f5f2ee 100%);
  border-top: 1px solid rgba(139,92,246,.1);
}
.ic-ai-lv-esoterico .ic-ai-level-title {
  color: #c084fc;
  text-shadow: 0 0 20px rgba(192,132,252,.2);
}
.ic-ai-lv-esoterico .ic-ai-level-body p {
  color: #5d5550;
  font-style: italic;
}

/* Mobile */
@media (max-width: 600px) {
  .ic-ai-header { padding: 18px 20px; }
  .ic-ai-level-head { padding: 14px 18px 0; }
  .ic-ai-level-body { padding: 10px 18px 16px; }
  .ic-ai-title { font-size: 1.05em; }
}
