/* Each scene uses the same 192 × 144 drawing surface. The horizon extends to the card edges. */
.os-study {
  --sky: #24201e;
  --haze: #574337;
  --ground: #39291c;
  --seam: #594337;
  --rim: #181418;
  --brass: #d3a14f;
  --cream: #f0dba6;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  inline-size: 100%;
  block-size: 100%;
  min-block-size: 144px;
  isolation: isolate;
  background: linear-gradient(to bottom, var(--sky), var(--haze) 70%, var(--seam) 70% 72%, var(--ground) 72%);
}
:root[data-theme="light"] .os-study {
  --sky: #d4bb82;
  --haze: #f2dbad;
  --ground: #b58a5a;
  --seam: #906a47;
}
.os-scene { position: relative; width: 192px; height: 144px; flex: none; }
.os-scene i, .os-scene b { display: block; position: absolute; box-sizing: border-box; }
.os-scene i::before, .os-scene i::after { position: absolute; box-sizing: border-box; }

/* The hammer pivots at the end of its handle. Scale leaves the billet on impact. */
.os-smith { background: radial-gradient(ellipse at 50% 68%, #88422266, transparent 53%), linear-gradient(var(--sky) 0 65%, var(--seam) 65% 67%, var(--ground) 67%); }
.os-stump {
  left: 57px; bottom: 8px; width: 73px; height: 44px;
  background: repeating-linear-gradient(90deg, #69472d 0 9px, #94613d 9px 12px, #795137 12px 21px);
  border-block: 5px solid #452c20;
  clip-path: polygon(6% 0, 93% 0, 93% 76%, 100% 88%, 100% 100%, 0 100%, 0 88%, 6% 76%);
}
.os-anvil {
  bottom: 47px; left: 24px; width: 134px; height: 47px;
  background: linear-gradient(#d4c8ac 0 4px, #888981 4px 11px, #5f6464 11px 42%, #343a3e 42% 86%, #595e5f 86%);
  clip-path: polygon(0 7%, 28% 7%, 28% 0, 96% 0, 96% 13%, 100% 13%, 100% 26%, 83% 32%, 75% 54%, 62% 54%, 62% 67%, 75% 85%, 75% 100%, 28% 100%, 28% 85%, 41% 67%, 41% 49%, 30% 40%, 19% 40%, 12% 29%, 5% 23%);
}
.os-billet { bottom: 94px; left: 68px; width: 35px; height: 6px; background: #fda64c; border-top: 2px solid #ffe6a0; }
.os-hammer {
  width: 9px; height: 46px; left: 125px; top: 2px; transform-origin: 50% 2px;
  background: linear-gradient(90deg, #503520 0 25%, #bd8a5d 25% 67%, #795036 67%);
  transform: rotate(48deg);
}
.os-hammer::after {
  content: ''; width: 29px; height: 15px; bottom: -4px; left: -10px;
  border-block: 3px solid #515758; border-top-color: #cfbea3;
  background: linear-gradient(90deg, #858b83 45%, #685540 45% 60%, #89908a 60%);
}
.os-scale { left: 95px; top: 42px; width: 4px; height: 3px; background: #f7d580; opacity: 0; }
@keyframes os-hammer-blow { 0%, 38%, 100% { transform: rotate(48deg); } 57% { transform: rotate(75deg); } 68%, 73% { transform: rotate(31deg); } }
@keyframes os-scale-flight { 0%, 67%, 90%, 100% { opacity: 0; } 68% { transform: translate(0); opacity: 1; } 78% { transform: translate(-17px,-10px); opacity: 1; } 89% { transform: translate(-28px,0); opacity: 0; } }

/* The ripple opens around the waist of the cork and vanishes under the pier. */
.os-harbour {
  --sea: #334d50;
  --foam: #99b5a0;
  background: linear-gradient(to bottom, #252731, #5c5552 49%, #8c796a 49% 51%, var(--sea) 51% 75%, #294247 75%);
}
:root[data-theme="light"] .os-harbour { --sea: #829b91; --foam: #ede3ba; background: linear-gradient(#b9c4ad, #e6d2a7 49%, #a6ad93 49% 51%, var(--sea) 51% 75%, #688b80 75%); }
.os-pier {
  top: 77px; left: -8px; width: 75px; height: 12px;
  background: repeating-linear-gradient(90deg, #a87b50 0 14px, #644330 14px 17px);
  border-top: 3px solid #c79b6e; border-bottom: 3px solid #46362c;
}
.os-pier::after { content: ''; left: 9px; top: 9px; width: 8px; height: 41px; background: #69503c; box-shadow: 43px 0 #78563b; }
.os-fishing-rod { left: 38px; top: 31px; width: 93px; height: 49px; background: #a98053; clip-path: polygon(0 94%, 45% 30%, 75% 4%, 92% 0, 100% 7%, 92% 5%, 76% 11%, 47% 37%, 5% 100%); }
.os-line { left: 128px; top: 33px; width: 2px; height: 51px; background: #d7caa8; transform-origin: top; }
.os-cork { left: 124px; top: 81px; width: 10px; height: 18px; background: linear-gradient(#e8d7a9 0 30%, #ac4e38 30% 68%, #e8d7a9 68%); clip-path: polygon(30% 0,70% 0,70% 20%,100% 36%,100% 73%,65% 100%,30% 100%,0 70%,0 36%,30% 20%); }
.os-ring { left: 114px; top: 91px; width: 31px; height: 8px; border: 2px solid var(--foam); border-radius: 50%; }
@keyframes os-bite { 0%, 32%, 62%, 100% { translate: 0 0; } 42% { translate: 0 4px; } 73%, 78% { translate: 0 7px; } }
@keyframes os-line-tug { 0%, 32%, 62%, 100% { scale: 1 1; } 42% { scale: 1 1.08; } 73%, 78% { scale: 1 1.14; } }
@keyframes os-ripple { 0%, 40% { scale: .5 .65; opacity: .15; } 46% { opacity: .85; } 93%, 100% { scale: 2.4 1.6; opacity: 0; } }

.os-clue { background: radial-gradient(ellipse at 76% 50%, #99693d59, transparent 43%), linear-gradient(var(--sky) 0 65%, var(--seam) 65% 67%, var(--ground) 67%); }
.os-scroll { top: 39px; left: 20px; width: 100px; height: 71px; transform: rotate(-7deg); background: #c7a06a; border: 3px solid #805a38; box-shadow: 5px 5px #251d174f; }
.os-scroll::before, .os-scroll::after { content: ''; left: -6px; right: -6px; height: 12px; border: 2px solid #976e42; background: linear-gradient(#c29b61, #f2daa2 45%, #c6a16f 70%, #a7794e); }
.os-scroll::before { top: -6px; } .os-scroll::after { bottom: -6px; }
.os-trail { left: 11px; top: 26px; width: 50px; height: 17px; border-top: 2px dashed #775b3a; border-right: 2px dashed #775b3a; transform: skewY(12deg); }
.os-cross { top: 35px; right: 17px; width: 14px; height: 14px; background: linear-gradient(45deg, transparent 41%, #8d3628 41% 58%, transparent 58%), linear-gradient(-45deg, transparent 41%, #8d3628 41% 58%, transparent 58%); }
.os-candlestick { left: 142px; bottom: 33px; width: 17px; height: 39px; background: linear-gradient(90deg, #c3a363 0 20%, #f2dba4 20% 75%, #ac8953 75%); border-top: 3px solid #eed9a8; }
.os-candlestick::before { content: ''; left: -10px; bottom: -8px; width: 37px; height: 9px; background: var(--brass); border-block: 2px solid #8d673a; }
.os-flame { left: 143px; bottom: 73px; width: 14px; height: 23px; transform-origin: bottom center; background: linear-gradient(#e68c30 45%, #ffd17a 45% 68%, #fff3b8 68%); clip-path: polygon(45% 0,58% 0,58% 21%,74% 35%,74% 48%,100% 64%,100% 82%,69% 100%,28% 100%,0 79%,0 54%,25% 31%,25% 20%,45% 17%); }
@keyframes os-gutter { 0%, 26%, 65%, 100% { transform: scale(1) skewX(0); } 34%, 48% { transform: scale(1.12,.82) skewX(-10deg); } 82% { transform: scale(.86,1.1) skewX(6deg); } }

.os-mine { background: linear-gradient(148deg, transparent 0 31%, #61534a44 31% 36%, transparent 36%), linear-gradient(25deg, var(--ground) 28%, var(--seam) 28% 31%, var(--haze) 31% 58%, var(--sky) 58%); }
.os-rock { left: 31px; bottom: 26px; width: 117px; height: 69px; background: conic-gradient(from 20deg at 44% 29%, #8c8173 0 82deg,#665e5b 82deg 148deg,#534e4e 148deg 239deg,#a19680 239deg 293deg,#746e67 293deg); clip-path: polygon(0 80%,15% 43%,27% 37%,34% 14%,53% 0,74% 12%,86% 40%,95% 47%,100% 76%,90% 96%,17% 100%); }
.os-vein { left: 62px; bottom: 48px; width: 57px; height: 34px; background: linear-gradient(120deg,#8d5437,#df9b66 55%,#935c43); clip-path: polygon(0 76%,23% 45%,31% 45%,37% 21%,50% 20%,68% 0,74% 11%,55% 35%,43% 35%,39% 53%,28% 63%,5% 92%,0 92%); }
.os-pick { left: 127px; top: 1px; width: 8px; height: 62px; transform: rotate(37deg); transform-origin: center 3px; background: linear-gradient(90deg,#745135 0 35%,#bd8d59 35%); }
.os-pick::after { content: ''; left: -24px; bottom: -4px; width: 56px; height: 19px; background: linear-gradient(#c6c2ac 0 30%,#8c9696 30% 62%,#4f595e 62%); clip-path: polygon(0 100%,9% 48%,32% 8%,54% 0,79% 15%,96% 56%,100% 92%,73% 51%,46% 42%,23% 59%); }
.os-ore { left: 97px; top: 55px; width: 7px; height: 6px; transform: rotate(-18deg); background: #e4a372; border-bottom: 2px solid #854b31; }
@keyframes os-pick-stroke { 0%,33%,100% { rotate: 9deg; } 52% { rotate: 25deg; } 64%,72% { rotate: -24deg; } 82% { rotate: 4deg; } }
@keyframes os-chip { 0%,63% { opacity: 0; translate: 0; } 64% { opacity: 1; translate: 0; } 77% { translate: -17px -11px; } 94% { opacity: 1; translate: -32px 18px; } 100% { opacity: 0; translate: -32px 18px; } }

.os-mill { background: linear-gradient(to bottom, var(--sky),var(--haze) 62%,var(--seam) 62% 64%,var(--ground) 64%); }
.os-wheat { left: 0; right: 0; bottom: 22px; height: 22px; opacity: .74; background: repeating-linear-gradient(76deg,transparent 0 9px,#b38d51 9px 12px,transparent 12px 14px); clip-path: polygon(0 48%,20% 0,45% 22%,59% 50%,85% 16%,100% 50%,100% 100%,0 100%); }
.os-tower { left: 68px; top: 47px; width: 64px; height: 79px; background: linear-gradient(90deg,#927b61 0 21%,#cbb38b 21% 69%,#a38a69 69%); clip-path: polygon(24% 0,76% 0,100% 100%,0 100%); }
.os-tower::after { content: ''; width: 13px; height: 21px; background: #534236; bottom: 0; left: 26px; border-top: 4px solid #7e6249; }
.os-cap { left: 68px; top: 25px; width: 64px; height: 30px; background: repeating-linear-gradient(0deg,#70503b 0 5px,#936744 5px 8px); clip-path: polygon(0 100%,10% 66%,36% 15%,49% 0,65% 13%,91% 67%,100% 100%); }
.os-sails { left: 97px; top: 50px; width: 7px; height: 7px; border-radius: 50%; background: #533926; transform: rotate(20deg); }
.os-sails b { top: 2px; left: 3px; width: 43px; height: 4px; background: #714f34; transform-origin: left center; }
.os-sails b::after { content: ''; position: absolute; top: 2px; right: 1px; width: 29px; height: 11px; border: 1px solid #8a7658; background: repeating-linear-gradient(90deg,#ead6aa 0 6px,#a18c6b 6px 8px); }
.os-sails b:nth-child(2) { rotate: 90deg; } .os-sails b:nth-child(3) { rotate: 180deg; } .os-sails b:nth-child(4) { rotate: 270deg; }
@keyframes os-mill-turn { from { transform: rotate(20deg); } to { transform: rotate(380deg); } }

.os-bank { background: linear-gradient(to bottom,var(--sky), var(--haze) 55%, var(--seam) 55% 57%, var(--ground) 57%); }
.os-pouch { left: 39px; bottom: 27px; width: 73px; height: 77px; background: linear-gradient(113deg,#ad8053 0 20%,#98663e 20% 42%,#845734 42% 65%,#67422c 65% 83%,#523527 83%); clip-path: polygon(21% 2%,43% 10%,56% 0,78% 4%,66% 23%,74% 37%,91% 51%,100% 76%,95% 93%,77% 100%,27% 100%,4% 91%,0 71%,9% 52%,30% 29%,36% 22%); }
.os-knot { left: 62px; top: 55px; width: 31px; height: 7px; border-block: 2px solid #e4be76; background: #916232; transform: rotate(-6deg); }
.os-knot::after { content: ''; left: 23px; top: 1px; width: 17px; height: 14px; border: 3px solid #c39758; border-radius: 60% 50% 40% 10%; }
.os-stack { left: 92px; bottom: 23px; width: 32px; height: 18px; border: 2px solid #976323; border-radius: 30% / 20%; background: repeating-linear-gradient(#f0bf59 0 3px, #946527 3px 5px); }
.os-stack::after { content: ''; inset: -2px -2px auto; height: 7px; border-radius: 50%; background: #efd183; border: 2px solid #be8733; }
.os-loose-coin { left: 130px; bottom: 24px; width: 25px; height: 26px; border: 3px solid #a7762b; border-radius: 50%; background: #eac36a; box-shadow: inset 0 0 0 2px #ffe4a0; transform-origin: center bottom; }
.os-loose-coin::after { content: ''; inset: 4px 6px; position: absolute; border: 2px solid #a7762b; transform: rotate(28deg); }
@keyframes os-coin-spin { 0%,12%,100% { transform: scale(1,.35) rotate(8deg); } 26% { transform: scale(.22,.9) rotate(-10deg); } 39% { transform: scale(1,1) rotate(5deg); } 54% { transform: scale(.19,.92) rotate(-8deg); } 69% { transform: scale(.95,.79) rotate(5deg); } 85% { transform: scale(.7,.42) rotate(-4deg); } }

.os-inferno {
  background: radial-gradient(ellipse at 50% 60%, #98552b55, transparent 45%), linear-gradient(var(--sky), var(--haze) 79%, var(--ground) 79%);
}
.os-cape {
  inset: 13px 53px 10px;
  background: #382725;
  clip-path: polygon(35% 0, 65% 0, 75% 7%, 83% 12%, 79% 25%, 89% 57%, 100% 89%, 90% 98%, 78% 92%, 68% 100%, 49% 95%, 34% 100%, 25% 92%, 12% 96%, 0 87%, 13% 52%, 20% 24%, 16% 12%, 26% 7%);
}
.os-lining {
  inset: 6px 5px 7px;
  clip-path: polygon(28% 0, 70% 0, 77% 16%, 74% 23%, 91% 75%, 100% 92%, 85% 99%, 74% 92%, 63% 100%, 48% 94%, 34% 100%, 23% 91%, 10% 97%, 0 89%, 22% 22%, 19% 13%);
  background-color: #ef852d;
  background-image: var(--osrs-molten);
  background-size: 38px 28px, 57px 42px, 57px 42px;
}
.os-yoke {
  inset: 6% 17% auto; height: 25%;
  background: linear-gradient(120deg, #ba7948, #5d4340 32%, #262529 33% 52%, #5b3d36 53% 75%, #bb8c5d 76%);
  clip-path: polygon(0 10%, 22% 0, 50% 28%, 76% 0, 100% 12%, 78% 59%, 68% 48%, 48% 100%, 30% 49%, 19% 61%);
}
@keyframes os-cape-flow { to { background-position: 38px -28px, -57px 42px, 57px -42px; } }

@media (prefers-reduced-motion: no-preference) {
  .os-hammer { animation: os-hammer-blow 3.6s steps(8) infinite; }
  .os-scale { animation: os-scale-flight 3.6s steps(7) infinite; }
  .os-cork { animation: os-bite 4.8s steps(5) infinite; }
  .os-line { animation: os-line-tug 4.8s steps(5) infinite; }
  .os-ring { animation: os-ripple 4.8s ease-out infinite; }
  .os-flame { animation: os-gutter 2.4s steps(4) infinite; }
  .os-pick { animation: os-pick-stroke 3s steps(7) infinite; }
  .os-ore { animation: os-chip 3s steps(7) infinite; }
  .os-sails { animation: os-mill-turn 14.4s steps(60) infinite; }
  .os-loose-coin { animation: os-coin-spin 4.2s ease-in-out infinite; }
  .os-lining { animation: os-cape-flow 12s steps(38, end) infinite; }
}
