/* Garnishment lesson. All rules scoped under .grn-* */
.grn-note { font-size: 12.5px; color: var(--faint); text-align: center; max-width: 320px; margin: 0 auto; line-height: 1.35; }

/* ---------- payday ---------- */
.grn-pay { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 330px; margin: 0 auto; }
.grn-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.grn-boss { display: flex; align-items: center; gap: 8px; }
.grn-boss img { height: 64px; width: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); }
.grn-boss span { font: 600 12.5px var(--sans); color: var(--dim); }
.grn-co { display: flex; align-items: center; gap: 8px; opacity: .45; transition: opacity .4s; }
.grn-co img { width: 52px; transition: transform .35s cubic-bezier(.3,1.6,.5,1), filter .35s; }
.grn-co span { font: 600 12.5px var(--sans); color: var(--dim); }
.grn-pay.snip .grn-co { opacity: 1; }
.grn-pay.got .grn-co img { transform: scale(1.15) rotate(-6deg); filter: drop-shadow(0 0 12px rgba(139,108,255,.7)); }
.grn-cash { display: flex; gap: 6px; height: 46px; }
.grn-bill { display: flex; align-items: center; justify-content: center; width: 70px; height: 42px; border-radius: 5px; background: linear-gradient(135deg, #7FD9A8, #3E9E6C); border: 2px solid #CFF3DD; box-shadow: 0 5px 10px rgba(0,0,0,.4); opacity: 0; transform: translateY(30px) scale(.7); transition: opacity .3s, transform .45s cubic-bezier(.2,.8,.2,1), translate .8s cubic-bezier(.5,0,.3,1), scale .8s; }
.grn-bill b { font: 800 15px var(--sans); color: #0E3A22; }
.grn-pay.open .grn-bill { opacity: 1; transform: none; }
.grn-pay.open .grn-bill:nth-child(2) { transition-delay: .08s; } .grn-pay.open .grn-bill:nth-child(3) { transition-delay: .16s; } .grn-pay.open .grn-bill:nth-child(4) { transition-delay: .24s; }
.grn-pay.open .grn-bill.gone { scale: .4; opacity: 0; transition: translate .8s cubic-bezier(.5,0,.3,1), scale .8s, opacity .3s .55s; }
.grn-stub { width: 100%; padding: 10px 14px; border-radius: 10px; background: #F4E9D2; box-shadow: 0 6px 14px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 4px; }
.grn-stub div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.grn-stub span { font: 600 13px var(--sans); color: #6A5634; }
.grn-stub b { font: 800 16px var(--sans); color: #2A1E0C; font-variant-numeric: tabular-nums; }
.grn-cut, .grn-net { display: none !important; }
.grn-pay.stub .grn-cut, .grn-pay.stub .grn-net { display: flex !important; animation: rise .35s cubic-bezier(.2,.8,.2,1); }
.grn-cut b { color: #5B3FD0; }
.grn-net { border-top: 1.5px dashed rgba(42,30,12,.35); padding-top: 4px; }

/* ---------- the court letter ---------- */
.grn-letter { display: flex; justify-content: center; width: 100%; }
.grn-paper { position: relative; width: 100%; max-width: 290px; padding: 16px 18px 52px; border-radius: 6px; background: #F4E9D2; box-shadow: 0 10px 22px rgba(0,0,0,.45); transform: rotate(-1.5deg); display: flex; flex-direction: column; gap: 6px; }
.grn-from { font: 700 12px var(--sans); color: #7A6440; letter-spacing: .03em; }
.grn-paper b { font: 800 17px var(--serif); color: #2A1E0C; }
.grn-paper p { margin: 0; font: 500 14px/1.35 var(--sans); color: #3A2A14; }
.grn-stamp { position: absolute; right: 14px; bottom: 10px; max-width: 170px; padding: 4px 8px; border: 2.5px solid #5B3FD0; border-radius: 6px; font: 800 12px/1.2 var(--sans); color: #5B3FD0; text-align: center; transform: rotate(-10deg) scale(1.8); opacity: 0; transition: transform .3s cubic-bezier(.3,1.4,.5,1), opacity .2s; }
.grn-letter.ruled .grn-stamp { opacity: .92; transform: rotate(-10deg); }

/* ---------- debt court ---------- */
.grn-court { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.grn-bench { width: 180px; height: 34px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #A86A35, #7E4C22); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 12px rgba(0,0,0,.4); }
.grn-bench span { font: 700 12px var(--sans); color: #F4E9D2; }
.grn-seats { display: grid; grid-template-columns: repeat(5, 48px); gap: 12px 10px; }
.grn-seat { position: relative; display: block; width: 48px; height: 56px; }
.grn-seat::after { content: ''; position: absolute; left: 4px; right: 4px; bottom: 0; height: 22px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #5A3A20, #3E2714); }
.grn-seat b { position: absolute; left: 50%; bottom: 14px; width: 30px; height: 36px; margin-left: -15px; border-radius: 15px 15px 6px 6px; background: linear-gradient(180deg, var(--violet-bright), var(--violet)); display: none; z-index: 1; }
.grn-seat b::before { content: ''; position: absolute; left: 50%; top: -14px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: #E9C9A8; }
.grn-seat.in b { display: block; }
.grn-seat:not(.in)::before { content: 'Lost'; position: absolute; left: 50%; top: 10px; translate: -50% 0; padding: 1px 4px; border: 2px solid var(--violet-bright); border-radius: 4px; font: 800 12px var(--sans); color: var(--violet-bright); rotate: -12deg; opacity: 0; scale: 1.6; transition: opacity .2s, scale .3s cubic-bezier(.3,1.4,.5,1); z-index: 2; }
.grn-court.lost .grn-seat:not(.in)::before { opacity: 1; scale: 1; }
.grn-cap { font: 600 13px var(--sans); color: var(--dim); text-align: center; }

/* ---------- the order ---------- */
.grn-order { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.grn-doc { max-width: 300px; padding: 8px 14px; border-radius: 8px; background: #F4E9D2; box-shadow: 0 6px 14px rgba(0,0,0,.4); text-align: center; display: flex; flex-direction: column; gap: 2px; }
.grn-doc span { font: 700 12px var(--sans); color: #7A6440; }
.grn-doc b { font: 700 14px/1.3 var(--sans); color: #2A1E0C; }
.grn-pk { width: 100%; }
.grn-pk .choices.grn-two { display: flex; flex-direction: row; justify-content: center; gap: 14px; }
.grn-pk .choice { width: 140px; padding: 8px; min-height: 0; justify-content: center; border-radius: 16px; background: var(--surface); }
.grn-who { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.grn-who img { height: 130px; width: auto; max-width: 120px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.4)); }
.grn-who b { font: 700 14px var(--sans); color: var(--text); }

/* ---------- the quarter cap ---------- */
.grn-caps { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 340px; margin: 0 auto; }
.grn-legend { width: 100%; display: flex; justify-content: space-between; font: 600 12.5px var(--sans); color: var(--dim); }
.grn-q { color: var(--gold); }
.grn-q::before { content: ''; display: inline-block; width: 0; height: 11px; border-left: 2px dashed var(--gold); margin-right: 5px; vertical-align: -1px; }
.grn-pk3 { width: 100%; }
.grn-bars.choices { gap: 8px; }
.grn-bars .choice { min-height: 52px; padding: 8px 12px; display: flex; flex-direction: column; align-items: stretch; gap: 5px; background: var(--surface); }
.grn-lab { font: 600 13px var(--sans); color: var(--dim); }
.grn-lab b { color: var(--text); font-weight: 800; }
.grn-track { position: relative; display: block; height: 16px; border-radius: 5px; background: linear-gradient(135deg, #7FD9A8, #3E9E6C); overflow: hidden; }
.grn-track i { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, #5B3FD0 0 6px, #7B5CF0 6px 12px); }
.grn-track em { position: absolute; left: 25%; top: -2px; bottom: -2px; border-left: 2px dashed var(--gold); }

/* ---------- the floor ---------- */
.grn-floor { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 340px; margin: 0 auto; }
.grn-safe { color: var(--gold); }
.grn-fl { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.grn-ftrack { position: relative; display: block; height: 18px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.grn-ftrack i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(135deg, #7FD9A8, #3E9E6C); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.grn-ftrack::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 27.19%; background: repeating-linear-gradient(135deg, rgba(255,214,102,.55) 0 5px, rgba(255,214,102,.15) 5px 10px); opacity: 0; transition: opacity .3s; z-index: 1; }
.grn-ftrack em { position: absolute; left: 27.19%; top: -2px; bottom: -2px; border-left: 2.5px dashed var(--gold); opacity: 0; transition: opacity .3s; z-index: 2; }
.grn-floor:not(.shown) .grn-ftrack i { width: 0 !important; }
.grn-floor.shown .grn-ftrack::after, .grn-floor.shown .grn-ftrack em { opacity: 1; }

@media (max-height: 700px) {
  .grn-boss img { height: 52px; }
  .grn-who img { height: 104px; }
  .grn-seats { grid-template-columns: repeat(5, 42px); gap: 8px; }
  .grn-seat { width: 42px; height: 50px; }
  .grn-bars .choice { min-height: 48px; padding: 6px 12px; }
  .grn-paper { padding: 12px 16px 48px; }
}
