.random-event-shell{color:#e9d8e5;min-height:290px}
.random-event-top{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:2px solid #80624d;padding:0 3px 9px}
.random-event-tag{font-size:12px;letter-spacing:.12em;color:#c29b69;font-weight:700}
.random-event-icon{font-size:24px;color:#d7b17f}
.random-event-shell>h2{font-family:Georgia,'Yu Mincho',serif;color:#f3cf95;font-size:27px;margin:15px 0 12px}
.random-event-layout{display:flex;gap:20px;align-items:stretch}
.random-event-body{flex:1;min-width:0}
.random-event-lead{font-size:16px;line-height:1.65;margin:0 0 12px}
.random-event-lilith{background:#2a2039;padding:12px;border:2px solid #6e5574;color:#f1e0ec;font-size:14px;line-height:1.7;margin:0 0 16px}
.random-event-lilith b{color:#e7c689;margin-right:10px}
.random-event-options{display:grid;gap:9px;margin:14px 0}
.random-event-options .event-option{min-height:56px;text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:9px 15px;white-space:normal;gap:4px;border-radius:0}
.random-event-options .event-option strong{font-size:15px}
.random-event-options .event-option span{font-size:12px;opacity:.85;font-weight:400}
.random-event-options .event-option:disabled{opacity:.45;cursor:not-allowed}
.random-event-foot{border-top:2px solid #54425d;padding-top:12px;margin-top:14px;font-size:12px;color:#b7a5bd}
.merchant-portrait-box{width:38%;min-width:200px;max-width:310px;background:radial-gradient(circle at center,#3e2853,#21172e 70%,#16101d);border:3px solid #9e7c51;box-shadow:inset 0 0 0 4px #31253e;display:flex;justify-content:center;align-items:center;overflow:hidden;min-height:320px}
.merchant-portrait-box img{max-width:100%;height:360px;max-height:58vh;object-fit:contain;object-position:center bottom;image-rendering:pixelated;filter:drop-shadow(3px 4px 0 #150e1c)}
.event-target-label{display:block;font-size:13px;color:#e4c397;font-weight:700;margin:12px 0 6px}
.event-target{width:100%;border:2px solid #9f7e54;background:#211829;color:#f1e2cc;padding:10px 12px;font-size:15px;border-radius:0}
.event-target option{background:#231b30;color:#fff}
.event-merchant-note,.event-warning{font-weight:700;font-size:14px;color:#e4bf84;margin:10px 0}
@media(max-width:760px){.random-event-layout{flex-direction:column;gap:10px}.merchant-portrait-box{width:100%;max-width:none;min-height:0;height:195px}.merchant-portrait-box img{height:220px}.random-event-shell>h2{font-size:23px;margin:8px 0}.random-event-lead{font-size:14px}}

/* Ver.2.14 Lilith responds to clicks during random events as well. */
.random-event-lilith{display:flex;align-items:center;gap:12px}
.event-lilith-button{flex:0 0 82px;width:82px;height:94px;border:2px solid #a58262;padding:0;overflow:hidden;background:#22172f}
.event-lilith-button img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 26%}
.event-lilith-dialogue{min-width:0;flex:1}
.event-lilith-dialogue b{display:block;margin:0 0 4px;color:#e7c689;font-size:13px}
.event-lilith-dialogue p{margin:0;color:#f1e0ec;font-size:14px;line-height:1.65}
@media(max-width:490px){.random-event-lilith{gap:8px;padding:8px}.event-lilith-button{flex-basis:65px;width:65px;height:77px}.event-lilith-dialogue p{font-size:13px}}

/* Ver.2.37: compact merchant offers with clear one-item limit and target picker. */
.event-merchant-intro{color:#e4d3b9;font-size:13px;line-height:1.65;margin:4px 0 12px}
.event-merchant-intro b{color:#f5d391}
.event-merchant-target{border:1px solid #776080;background:#251d33;margin:8px 0 12px;padding:8px 12px}
.event-merchant-target summary{font-weight:700;color:#f0d4a4;cursor:pointer;font-size:13px}
.event-merchant-target .event-target-picker{margin-top:10px}
.random-event-options.merchant-goods{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.random-event-options.merchant-goods .event-option{min-height:74px;padding:10px 12px}
.random-event-options.merchant-goods .event-option strong{font-size:14px}
.random-event-options.merchant-goods .event-option span{font-size:12px;line-height:1.45}
@media(max-width:530px){.random-event-options.merchant-goods{grid-template-columns:1fr}}

/* Merchant affordance: a warm illuminated offer can be bought; sold-out and
   unaffordable stock recedes into shadow. No visible status labels or badges. */
.merchant-shop-summary{margin:7px 0 5px;font-size:12px;color:#baa9b4}
.random-event-options.merchant-goods .merchant-offer{
 position:relative;min-height:98px;padding:12px 14px;gap:5px;
 border:2px solid #8e7456!important;background:#2c2234!important;opacity:1;
 transition:border-color .18s ease,box-shadow .18s ease,background .18s ease,filter .18s ease;
}
.random-event-options.merchant-goods .merchant-offer.merchant-available{
 border-color:#e8c287!important;
 background:linear-gradient(145deg,#4a3845 0%,#372840 65%,#3f2f38 100%)!important;
 box-shadow:inset 0 0 0 1px #e6b97657,inset 0 0 22px #a67c3a24,0 0 13px #cb99506e!important;
 color:#f7e9df!important;opacity:1;filter:none!important;
}
.random-event-options.merchant-goods .merchant-offer.merchant-available strong{color:#f9e2b3}
.random-event-options.merchant-goods .merchant-offer.merchant-available:hover,
.random-event-options.merchant-goods .merchant-offer.merchant-available:focus-visible{
 border-color:#ffe5a9!important;background:linear-gradient(145deg,#594347,#46314c)!important;
 box-shadow:inset 0 0 0 1px #ffdaa975,0 0 20px #e7b96c9a!important;
}
.random-event-options.merchant-goods .merchant-offer.merchant-available:focus-visible{
 outline:2px solid #ffe5a9;outline-offset:2px;
}
.random-event-options.merchant-goods .merchant-offer.merchant-unavailable,
.random-event-options.merchant-goods .merchant-offer.merchant-unavailable:disabled{
 border-color:#514958!important;background:#181620!important;
 box-shadow:none!important;opacity:.78;filter:grayscale(.72) brightness(.69)!important;
 color:#ac9fad!important;cursor:not-allowed;
}
.random-event-options.merchant-goods .merchant-offer.merchant-unavailable strong{color:#b5a8b4}
.random-event-options.merchant-goods .merchant-offer .merchant-price{
 font-weight:800;font-size:18px;color:#f3d18b;opacity:1;
}
.random-event-options.merchant-goods .merchant-offer.merchant-unavailable .merchant-price{color:#aaa1a5}
.random-event-options.merchant-goods .event-option:not(.merchant-offer){
 grid-column:1/-1;min-height:47px;
}
@media(max-width:530px){
 .random-event-options.merchant-goods .merchant-offer{min-height:88px}
}
@media(prefers-reduced-motion:reduce){
 .random-event-options.merchant-goods .merchant-offer{transition:none}
}

/* Special recruitment uses the same merchant cues: glowing usable choices,
   dark/desaturated unavailable choices. No visible purchasability badges. */
.special-recruit-offers .special-recruit-card{
 position:relative;min-height:98px;padding:12px 14px;gap:5px;
 border:2px solid #8e7456!important;background:#2c2234!important;opacity:1;
 transition:border-color .18s ease,box-shadow .18s ease,background .18s ease,filter .18s ease;
}
.special-recruit-offers .special-recruit-card.special-recruit-available{
 border-color:#e8c287!important;
 background:linear-gradient(145deg,#4a3845 0%,#372840 65%,#3f2f38 100%)!important;
 box-shadow:inset 0 0 0 1px #e6b97657,inset 0 0 22px #a67c3a24,0 0 13px #cb99506e!important;
 color:#f7e9df!important;opacity:1;filter:none!important;
}
.special-recruit-offers .special-recruit-card.special-recruit-available strong{color:#f9e2b3}
.special-recruit-offers .special-recruit-card.special-recruit-available:hover,
.special-recruit-offers .special-recruit-card.special-recruit-available:focus-visible{
 border-color:#ffe5a9!important;background:linear-gradient(145deg,#594347,#46314c)!important;
 box-shadow:inset 0 0 0 1px #ffdaa975,0 0 20px #e7b96c9a!important;
}
.special-recruit-offers .special-recruit-card.special-recruit-available:focus-visible{
 outline:2px solid #ffe5a9;outline-offset:2px;
}
.special-recruit-offers .special-recruit-card.special-recruit-unavailable,
.special-recruit-offers .special-recruit-card.special-recruit-unavailable:disabled{
 border-color:#514958!important;background:#181620!important;
 box-shadow:none!important;opacity:.78;filter:grayscale(.72) brightness(.69)!important;
 color:#ac9fad!important;cursor:not-allowed;
}
.special-recruit-offers .special-recruit-card.special-recruit-unavailable strong{color:#b5a8b4}
.special-recruit-offers .special-recruit-card.special-recruit-unavailable span{color:#aaa1ac}
.special-recruit-offers .special-recruit-card.special-recruit-available span{color:#e7d4e5}
@media(max-width:530px){.special-recruit-offers .special-recruit-card{min-height:88px}}
@media(prefers-reduced-motion:reduce){.special-recruit-offers .special-recruit-card{transition:none}}

/* These scoped overrides must win over the general RPG .btn !important skin.
   Both merchant and special cards were otherwise styled as ordinary buttons. */
