.fgh-wrap {
	--fgh-accent: #23408E;
	--fgh-good: #1F8A8A;
	--fgh-warn: #B4532A;
	--fgh-bg: #F3F5F8;
	--fgh-text: #2A1D17;
	--fgh-surface: #FFFFFF;
	--fgh-on-accent: #FFFFFF;
	--fgh-border: #C9CFDA;
	--fgh-muted: #5d6573;
	--fgh-grounds: #4A2E1F;
	box-sizing: border-box;
	max-width: 760px;
	margin: 1.5rem auto;
	color: var(--fgh-text);
	line-height: 1.9;
	text-align: right;
}
.fgh-wrap *, .fgh-wrap *::before, .fgh-wrap *::after { box-sizing: border-box; }
.fgh-app { padding: clamp(1rem, 4vw, 2rem); background: var(--fgh-bg); border-radius: 32px 32px 56px 56px; }
.fgh-screen { display: flex; flex-direction: column; gap: .9rem; }
.fgh-title { margin: 0; font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.5; color: var(--fgh-text); }
.fgh-title:focus { outline: none; }
.fgh-lead { margin: 0; max-width: 60ch; }
.fgh-note { margin: .4rem 0 0; font-size: .85rem; color: var(--fgh-muted); }
.fgh-limit { padding: .6rem .9rem; border-radius: 14px; background: var(--fgh-surface); border: 1px dashed var(--fgh-accent); color: var(--fgh-text); }

/* فنجان معرفی و آیین */
.fgh-cup { width: 150px; margin: 0 auto; color: var(--fgh-text); }
.fgh-cup svg { width: 100%; height: auto; display: block; overflow: visible; }
.fgh-steam path { opacity: .3; animation: fgh-steam 2.6s ease-in-out infinite; }
.fgh-steam path:nth-child(2) { animation-delay: .5s; }
.fgh-steam path:nth-child(3) { animation-delay: 1s; }
@keyframes fgh-steam { 0%, 100% { transform: translateY(0); opacity: .15; } 50% { transform: translateY(-5px); opacity: .45; } }
.fgh-ritual { align-items: center; text-align: center; padding: 1.5rem 0; }
.fgh-ritual .fgh-cup { width: 200px; }
.fgh-spin { animation: fgh-spin 1.3s linear 2; }
@keyframes fgh-spin { to { transform: rotate(360deg); } }
.fgh-settle { animation: fgh-settle 1.2s ease-out; }
@keyframes fgh-settle { 0% { transform: rotate(180deg) scale(.9); } 100% { transform: rotate(0) scale(1); } }
.fgh-ritual-msg { margin: 0; font-size: 1.15rem; font-weight: 600; min-height: 2em; }
.fgh-ritual .fgh-link { align-self: center; }

/* فرم */
.fgh-topics { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.fgh-topics legend { padding: 0; margin-bottom: .4rem; font-weight: 600; }
.fgh-chip input { position: absolute; opacity: 0; pointer-events: none; }
.fgh-chip label { display: inline-block; padding: .35rem 1rem; border: 1.5px solid var(--fgh-accent); border-radius: 999px; background: var(--fgh-surface); color: var(--fgh-text); cursor: pointer; transition: background .15s, color .15s; }
.fgh-chip input:checked + label { background: var(--fgh-accent); color: var(--fgh-on-accent); }
.fgh-chip input:focus-visible + label { outline: 3px solid var(--fgh-good); outline-offset: 2px; }
.fgh-fields { display: flex; flex-direction: column; gap: .7rem; }
.fgh-field { display: flex; flex-direction: column; gap: .25rem; max-width: 520px; }
.fgh-field label { font-weight: 600; }
.fgh-field input { padding: .6rem .9rem; border: 1.5px solid var(--fgh-border); border-radius: 14px; font: inherit; background: var(--fgh-surface); color: var(--fgh-text); }
.fgh-field input::placeholder { color: var(--fgh-muted); opacity: .8; }
.fgh-field input:focus { outline: 3px solid var(--fgh-good); outline-offset: 1px; border-color: var(--fgh-accent); }

.fgh-btn { align-self: flex-start; padding: .7rem 1.5rem; border: 1.5px solid var(--fgh-accent); border-radius: 999px; background: var(--fgh-accent); color: var(--fgh-on-accent); font: inherit; font-weight: 700; cursor: pointer; transition: transform .12s, opacity .12s; }
.fgh-btn:hover { opacity: .92; }
.fgh-btn:active { transform: scale(.97); }
.fgh-btn:focus-visible, .fgh-link:focus-visible, .fgh-blot:focus-visible, .fgh-hist-btn:focus-visible { outline: 3px solid var(--fgh-good); outline-offset: 3px; }
.fgh-btn-alt { background: var(--fgh-surface); color: var(--fgh-accent); }
.fgh-link { align-self: center; padding: 0; border: 0; background: none; color: var(--fgh-accent); font: inherit; text-decoration: underline; cursor: pointer; }
.fgh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

/* لکه‌های قهوه */
.fgh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .7rem; padding: 1rem; background: var(--fgh-surface); border-radius: 50% 50% 40% 40% / 14% 14% 8% 8%; border: 3px solid var(--fgh-accent); }
.fgh-blot { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; perspective: 600px; font: inherit; color: var(--fgh-text); }
.fgh-blot:disabled { cursor: default; opacity: .35; }
.fgh-blot-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .5s; }
.fgh-blot.is-open .fgh-blot-in { transform: rotateY(180deg); }
.fgh-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fgh-back { background: radial-gradient(circle at 35% 30%, #7a533b, var(--fgh-grounds) 62%, #2d1a10); border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .35); }
.fgh-blot:nth-child(3n) .fgh-back { border-radius: 44% 56% 41% 59% / 57% 43% 57% 43%; }
.fgh-blot:nth-child(4n+1) .fgh-back { border-radius: 52% 48% 63% 37% / 41% 58% 42% 59%; }
.fgh-blot:hover:not(:disabled):not(.is-open) .fgh-back { filter: brightness(1.2); }
.fgh-front { transform: rotateY(180deg); background: var(--fgh-bg); border: 2.5px solid #8b93a3; border-radius: 22px; line-height: 1.3; }
.fgh-blot.tone-good .fgh-front { border-color: var(--fgh-good); }
.fgh-blot.tone-warn .fgh-front { border-color: var(--fgh-warn); }
.fgh-emoji { font-size: 1.9rem; }
.fgh-cap { font-size: .72rem; font-weight: 600; }
.fgh-status { margin: 0; font-weight: 600; }

/* نتیجه: فنجان از بالا */
.fgh-intent { margin: 0; padding: .5rem .9rem; border-radius: 14px; background: var(--fgh-surface); }
.fgh-cupwrap { display: flex; flex-direction: column; align-items: center; }
.fgh-cup-svg { width: min(100%, 380px); height: auto; overflow: visible; }
.fgh-mk { cursor: pointer; }
.fgh-mk:focus-visible { outline: none; }
.fgh-mk:focus-visible .fgh-mk-bg { stroke-width: 5; }
.fgh-mk-in { transform-box: fill-box; transform-origin: center; opacity: 0; animation: fgh-pop .5s cubic-bezier(.3, 1.5, .5, 1) forwards; }
@keyframes fgh-pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
.fgh-mk-bg { fill: rgba(255, 255, 255, .94); stroke: #8b93a3; stroke-width: 3; }
.fgh-mk.tone-good .fgh-mk-bg { stroke: var(--fgh-good); }
.fgh-mk.tone-warn .fgh-mk-bg { stroke: var(--fgh-warn); }
.fgh-mk:hover .fgh-mk-bg { stroke-width: 5; }
.fgh-mk-n { fill: var(--fgh-accent); }
.fgh-mk-nt { fill: var(--fgh-on-accent); font-weight: 700; }

/* نتیجه: فهرست */
.fgh-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.fgh-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; margin-top: .6rem; padding-bottom: .2rem; border-bottom: 2px solid var(--fgh-accent); }
.fgh-group strong { font-size: 1.1rem; }
.fgh-group span { font-size: .85rem; color: var(--fgh-muted); }
.fgh-item { display: flex; gap: .9rem; padding: .9rem 1rem; background: var(--fgh-surface); border-radius: 20px 8px 20px 8px; border-inline-start: 6px solid #8b93a3; transition: box-shadow .3s, transform .3s; }
.fgh-item.tone-good { border-inline-start-color: var(--fgh-good); }
.fgh-item.tone-warn { border-inline-start-color: var(--fgh-warn); }
.fgh-item.is-hl { box-shadow: 0 0 0 3px var(--fgh-accent); transform: translateX(-4px); }
.fgh-item-emoji { font-size: 2rem; line-height: 1.2; }
.fgh-item-body { min-width: 0; }
.fgh-item-body p { margin: .2rem 0 0; }
.fgh-item-head { display: flex; align-items: center; gap: .5rem; }
.fgh-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .3rem; border-radius: 999px; background: var(--fgh-accent); color: var(--fgh-on-accent); font-size: .8rem; font-weight: 700; }
.fgh-wrap .fgh-sub { font-size: .85rem; color: var(--fgh-muted); }

.fgh-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; }
.fgh-note-card { padding: .9rem 1.1rem; background: var(--fgh-surface); border-radius: 8px 22px 8px 22px; border-inline-start: 6px solid var(--fgh-accent); }
.fgh-note-card h3 { margin: 0; font-size: 1rem; color: var(--fgh-text); }
.fgh-note-card p { margin: .2rem 0 0; }
.fgh-warncard { border-inline-start-color: var(--fgh-warn); }
.fgh-warncard h3 { color: var(--fgh-warn); }
.fgh-advicecard { border-inline-start-color: var(--fgh-good); }
.fgh-advicecard h3 { color: var(--fgh-good); }
.fgh-summary { padding: 1rem 1.2rem; border-radius: 8px 28px 8px 28px; background: var(--fgh-accent); color: var(--fgh-on-accent); }
.fgh-summary h3 { margin: 0 0 .2rem; font-size: 1.1rem; color: inherit; }
.fgh-summary p { margin: 0; }

/* تاریخچه */
.fgh-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.fgh-hist-btn { display: flex; flex-direction: column; width: 100%; padding: .7rem 1rem; border: 1.5px solid var(--fgh-border); border-radius: 16px; background: var(--fgh-surface); color: var(--fgh-text); font: inherit; text-align: right; cursor: pointer; }
.fgh-hist-btn:hover { border-color: var(--fgh-accent); }
.fgh-hist-btn span { font-size: .85rem; color: var(--fgh-muted); }

/* سؤالات متداول */
.fgh-faq { margin-top: 1rem; padding: 1rem 1.2rem; background: var(--fgh-bg); border-radius: 24px; }
.fgh-faq h3 { margin: 0 0 .4rem; font-size: 1.1rem; color: var(--fgh-text); }
.fgh-faq details { border-top: 1px solid var(--fgh-border); padding: .5rem 0; }
.fgh-faq summary { cursor: pointer; font-weight: 600; }
.fgh-faq summary:focus-visible { outline: 3px solid var(--fgh-good); outline-offset: 2px; }
.fgh-faq p { margin: .4rem 0 0; color: var(--fgh-muted); }

@media (prefers-reduced-motion: reduce) {
	.fgh-blot-in, .fgh-btn, .fgh-chip label, .fgh-item { transition: none; }
	.fgh-steam path, .fgh-spin, .fgh-settle { animation: none; }
	.fgh-mk-in { animation: none; opacity: 1; }
}
@media (max-width: 480px) {
	.fgh-grid { grid-template-columns: repeat(4, 1fr); border-radius: 36px; }
	.fgh-item { flex-direction: column; gap: .2rem; }
}
