/* Shared treasure display. Product, plank, and labels stay in normal document flow. */
.row-cards .treasure-display {filter:none;max-width:430px;}
.treasure-art {display:flex;align-items:flex-end;justify-content:center;width:100%;height:310px;padding:0;border:0;background:none;cursor:pointer;position:relative;isolation:isolate;}
.treasure-art::before {content:"";position:absolute;bottom:-3px;width:68%;height:12px;border-radius:50%;background:#230b07a0;filter:blur(4px);z-index:-1;}
.treasure-art img {display:block;width:auto;height:100%;max-width:95%;object-fit:contain;object-position:center bottom;transition:filter .16s;}
.treasure-art:hover img {filter:brightness(1.08);}
.treasure-art:active img {filter:brightness(.96);}
/* The RO stone base has a pointed underside; seat it on the rear of the floor. */
#game-ragnarok-new-world .treasure-art img {transform:translateY(6px);}
.treasure-row .shelf-plank {margin-top:-1px;}
/* The last treasure also needs a real floor before its label; legacy cards use the base. */
.treasure-row.final-row {z-index:4;}
.treasure-row.final-row .shelf-plank {height:auto;aspect-ratio:1040/85;background:var(--art-v12Plank) center top/100% auto no-repeat;}
.row-price-tags {display:grid;grid-template-columns:repeat(var(--row-items),minmax(0,1fr));gap:24px;margin:-42px auto 0;position:relative;z-index:2;padding-bottom:22px;}
.treasure-tag {position:relative;display:block;width:100%;max-width:340px;justify-self:center;border:0;padding:0;background:none;color:#542a13;cursor:pointer;transition:filter .16s,transform .16s;}
.treasure-tag>img {display:block;width:100%;height:auto;}
.tag-copy {position:absolute;inset:12% 9%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;text-align:center;}
.treasure-name {font-weight:700;font-size:clamp(14px,1.15vw,17px);line-height:1.2;}
.treasure-price {font-size:15px;line-height:1.25;color:#8a3d1b;}
.treasure-tag:hover {filter:brightness(1.05);transform:translateY(-2px);}
.treasure-tag:active {transform:translateY(1px);}
.treasure-art:focus-visible,.treasure-tag:focus-visible {outline:3px solid #ffda78;outline-offset:4px;border-radius:12px;}
.package-dialog {width:min(650px,calc(100% - 40px));max-height:min(85dvh,850px);padding:0;border:1px solid #c49047;border-radius:15px;background:#fff1d6;color:#4f2b18;box-shadow:0 24px 90px #21100788;overflow:hidden;}
.package-dialog[open] {display:flex;flex-direction:column;}
.package-dialog::backdrop {background:#211008b8;}
.dialog-header {display:flex;align-items:center;gap:18px;padding:18px 22px;border-bottom:1px solid #d5b17c;flex-shrink:0;background:#ffedcb;}
.dialog-header h2 {font-family:inherit;font-size:21px;line-height:1.3;margin:0;flex:1;}
.dialog-close {width:44px;height:44px;flex-shrink:0;border:1px solid #c39057;border-radius:50%;background:#fff4de;color:#64351b;font-size:29px;cursor:pointer;}
.dialog-body {overflow-y:auto;overscroll-behavior:contain;padding:20px 26px 12px;min-height:0;}
.dialog-product {height:180px;display:flex;justify-content:center;margin-bottom:14px;}
.dialog-product img {max-width:100%;height:100%;width:auto;object-fit:contain;}
.dialog-price {font-size:23px;font-weight:700;color:#9c3d1f;margin:0 0 10px;}
.dialog-intro {line-height:1.6;margin:0 0 20px;}
.dialog-body section {border-top:1px solid #dec39d;padding-block:14px;}
.dialog-body h3 {font-family:inherit;font-size:16px;margin:0 0 8px;}
.dialog-body section p {margin:0;line-height:1.6;white-space:pre-line;overflow-wrap:anywhere;}
.dialog-body dl {margin:0;}
.dialog-body dl>div {display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:6px 0;}
.dialog-body dt {color:#79573e;}.dialog-body dd {margin:0;overflow-wrap:anywhere;white-space:pre-line;}
.dialog-notice:empty {display:none;}.dialog-notice {color:#923317;padding:12px;border-radius:6px;background:#f6d8b1;}
.dialog-actions {padding:14px 24px;display:flex;justify-content:flex-end;border-top:1px solid #d5b17c;background:#ffedcb;flex-shrink:0;}
.modal-buy {border:1px solid #cb903d;border-radius:9px;background:#a73520;color:#fff5d6;font:700 16px system-ui;padding:12px 26px;min-height:48px;cursor:pointer;}
.modal-buy:hover {background:#bb4027;}.modal-buy:active {transform:translateY(2px);background:#872817;}
.package-dialog button:focus-visible {outline:3px solid #916119;outline-offset:3px;}
@media(max-width:1100px) {
  .treasure-art {height:260px;}
  .row-price-tags {gap:18px;margin-top:-25px;}
  .tag-copy {gap:3px;}
  .treasure-name {font-size:14px;}.treasure-price {font-size:13px;}
}
@media(max-width:650px) {
  .treasure-art {height:275px;}
  .treasure-art img {max-width:100%;}
  .row-price-tags {margin-top:-10px;padding-bottom:12px;gap:0;}
  .treasure-name {font-size:15px;}.treasure-price {font-size:14px;}
  .treasure-row+.treasure-row {padding-top:18px;}
  .package-dialog {width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:12px;}
  .dialog-header {padding:12px 14px;gap:10px;}
  .dialog-header h2 {font-size:18px;}
  .dialog-body {padding:18px;}
  .dialog-product {height:190px;}
  .dialog-actions {padding:12px 18px;padding-bottom:max(12px,env(safe-area-inset-bottom));}
  .modal-buy {width:100%;}
}
@media(prefers-reduced-motion:reduce) {.treasure-art img,.treasure-tag {transition:none;}}
