/* Source: card-view.css */
/* Shared RosyGames Card Art. The Klondike card appearance is canonical. */
.rosy-card.card {
  box-sizing:border-box;position:absolute;top:0;left:0;display:block;
  width:var(--card-w);height:var(--card-h);padding:0;text-align:left;
  border:2px solid #89544a;border-radius:clamp(3px,calc(var(--card-w) / 17),9px);
  background:linear-gradient(148deg,#fff2df 18%,#fce6ca 120%);
  box-shadow:none!important;color:#2b303f;font-family:Fraunces,Georgia,serif;
  user-select:none;-webkit-user-select:none;touch-action:none;overflow:hidden;
}
.rosy-card.card[data-color="red"]{color:#c43323}
.rosy-card.card.face{cursor:grab}
.rosy-card.card.face:active{cursor:grabbing}
.rosy-card.card.back{cursor:default;background:linear-gradient(148deg,#fff2df 18%,#fce6ca 120%)}
.rosy-card.card.back::after{content:'';position:absolute;inset:4%;border:0;
  border-radius:calc(var(--card-w) / 17);
  background:#e57e6c url('/assets/card-back.svg') no-repeat center/100% 100%;}
.rosy-card.card .card__corner{position:absolute;top:3%;left:6%;display:flex;
  flex-direction:column;align-items:center;gap:0;white-space:nowrap;
  font:740 calc(var(--label-font,var(--corner-font,16px))*1.27)/.89 Fraunces,Georgia,serif;
  letter-spacing:-.04em;}
.rosy-card.card .card__corner-suit{display:block;width:.79em;height:.79em;margin-top:1px;overflow:visible}
.rosy-card.card .card__top-suit{position:absolute;top:0;right:7%;width:26%;height:26%;overflow:visible}
.rosy-card.card .card__center{position:absolute;top:0;left:0;width:100%;height:100%;opacity:1}
.rosy-card.card .card__pip{position:absolute;left:var(--pip-x);top:var(--pip-y);
  width:20%;height:20%;transform:translate(-50%,-50%) rotate(var(--pip-flip,0deg));overflow:visible}
.rosy-card.card .card__pip--ace{width:47%;height:47%}
.rosy-card.card .card__portrait{position:absolute;bottom:0;left:2%;width:96%;height:79%;
  object-fit:contain;object-position:center bottom;pointer-events:none}
.rosy-card.card[data-last="false"] .card__center{visibility:hidden}
.rosy-card.card[data-tiny="true"] .card__corner{top:0;left:2px;flex-direction:row;gap:1px;
  font-size:var(--label-font,var(--corner-font,16px))}
.rosy-card.card[data-tiny="true"] .card__corner-suit{width:.7em;height:.7em;margin-top:0}
.rosy-card.card.back .card__corner,
.rosy-card.card.back .card__top-suit,
.rosy-card.card.back .card__center{visibility:hidden!important}
@media(max-width:760px){.rosy-card.card{border-width:1px}}

/* Shared hint presentation for Klondike and Spider. */
.rosy-idle-ring {
  position: absolute;
  box-sizing: border-box;
  display: block;
  z-index: 800;
  pointer-events: none;
  border: 2px solid rgba(255, 228, 178, .94);
  border-radius: clamp(6px, calc(var(--card-w) / 15), 12px);
  background: transparent;
  box-shadow: 0 0 0 1px rgba(222, 137, 108, .55),
              0 0 6px rgba(255, 223, 159, .23);
  transform-origin: center center;
  opacity: 0;
  animation: rosy-idle-halo 2.8s ease-out 1;
}
.rosy-idle-ring--first {
  /* Two gentle landing-like waves, starting as soon as the first board appears. */
  animation: rosy-idle-halo 2.4s ease-out 2;
}
@keyframes rosy-idle-halo {
  0% {opacity: 0; transform: scale(.985);}
  16% {opacity: .88; transform: scale(1.012);}
  42% {opacity: .72; transform: scale(1.045);}
  75% {opacity: .24; transform: scale(1.085);}
  100% {opacity: 0; transform: scale(1.11);}
}
.rosy-idle-ring--static {
  animation: none !important;
  opacity: .84 !important;
  transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .rosy-idle-ring {
    animation: none !important;
    opacity: .84;
    transform: none;
  }
}


/* Shared Engine: keep every moving face fully drawn until its motion ends. */
.rosy-card.card.rosy-card--in-flight.face .card__center {visibility:visible!important;}

/* Reveal the card exposed beneath a still-uncommitted drag. Keep its face
   fully readable without changing data-last or session state. */
.rosy-card.card.face.rosy-card--drag-exposed .card__center {visibility:visible!important;}

/* Source: game.css */
:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #4e3641;
  background: #faf5f3;
  --card-w: 100px; --card-h: 141px; --corner-font: 16px; --columns-gap: 11px;
  --tone: #a34664;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; width: 100%; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .43; cursor: default; }
button:focus-visible, select:focus-visible, .card:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid #e27a94; outline-offset: 2px; }
.app { height: 100dvh; min-height: 270px; display: flex; flex-direction: column; overflow: hidden; }
.topbar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px clamp(8px, 2vw, 24px); border-bottom: 1px solid #eedde1; background: #fffdfb; }
.brand { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.brand__flower { color: #cc6684; font-size: 30px; line-height: 1; }
.brand strong { display: block; font-family: Georgia, serif; font-size: 22px; color: #6a3c4f; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: #9a7d87; }
.topbar__right { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
button, select { background: white; border: 1px solid #e4cbd3; border-radius: 8px; padding: 8px 12px; font-weight: 650; white-space: nowrap; }
button:hover:not(:disabled) { background: #fbeef2; }
button.primary { background: #c36a85; border-color: #c36a85; color: white; }
button.primary:hover { background: #ae5070; }
.draw-setting { display: flex; align-items: center; gap: 7px; color: #8e6979; font-size: 12px; }
.draw-setting select { padding: 7px 6px; }
.infobar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px clamp(10px, 2vw, 24px); color: #8f6d7b; background: #f8eff1; font-size: 12px; }
.instructions { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats { font-weight: 750; white-space: nowrap; }
.play-area { display: flex; flex: 1 1 auto; min-height: 0; padding: 10px clamp(5px, 2vw, 24px) 0; justify-content: center; }
.board { width: min(100%, 1040px); height: 100%; display: flex; flex-direction: column; min-height: 0; touch-action: pan-x; --waste-fan-step:calc(var(--card-w) * .44); --waste-fan-double:calc(var(--card-w) * .88); }
.top-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: var(--columns-gap); min-height: 0; height: calc(var(--card-h) + 11px); flex: none; }
.pile { position: relative; min-width: 0; height: var(--card-h); border-radius: 7px; cursor: pointer; }
.pile__cards { position: absolute; top: 0; left: 0; right: 0; height: 100%; }
.stock:before, .waste:before, .foundation:before { content: ''; position: absolute; left: 0; top: 0; width: var(--card-w); height: var(--card-h); border-radius: calc(var(--card-w) / 18); border: 2px dashed #dab7c1; background: #fff9fb76; }
.foundation:before { border-color: #c9b0b8; }

/* Draw 3: reveal full-size ranks and suits on all three faces. The
   neighboring spacer gives this fan room without changing card size. */
.waste .pile__cards { overflow: visible; }
.waste .card[data-waste-slot="0"] { left: 0; }
.waste .card[data-waste-slot="1"] { left: var(--waste-fan-step); }
.waste .card[data-waste-slot="2"] { left: var(--waste-fan-double); }
.waste .card[data-waste-top="false"] { pointer-events: none; cursor: default; }

.pile .placeholder { position: absolute; top: calc(var(--card-h) / 2 - 23px); left: 0; width: var(--card-w); text-align: center; color: #a48d96; font-size: 36px; pointer-events: none; }
.tableau { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: var(--columns-gap); flex: 1; min-height: 0; width: 100%; }
.column { position: relative; min-width: 0; min-height: 0; cursor: pointer; }
.column:before { content: ''; position: absolute; top: 0; left: 0; width: var(--card-w); height: var(--card-h); border: 2px dashed #e4d5d9; border-radius: calc(var(--card-w) / 18); pointer-events: none; opacity: .55; }
.column:not([data-empty="true"]):before { opacity: 0; }
.column__cards { width: 100%; position: relative; height: 100%; }
.card { position: absolute; top: 0; left: 0; display: block; width: var(--card-w); height: var(--card-h); border-radius: clamp(3px, calc(var(--card-w) / 17), 9px); border: 1px solid #dbbdc4; background: #fffaf3; color: #25283b; box-shadow: 0 2px 5px #513c462b; user-select: none; -webkit-user-select: none; touch-action: none; overflow: hidden; padding: 0; text-align: left; }
.card[data-color="red"] { color: #b62c44; }
.card.face { cursor: grab; }
.card.face:active { cursor: grabbing; }
.card.back { cursor: default; background: repeating-linear-gradient(45deg, #dc8d9d 0 3px, #ecadac 3px 6px); border: 4px solid #fff6ec; box-shadow: 0 2px 5px #4938443d; }
.card.back:after { content: '❀'; display: grid; place-items: center; position: absolute; inset: 10% 11%; color: #fff5e7; background: #bf6783; border: 2px solid #ffe4e0; border-radius: 8px; font-size: clamp(16px, calc(var(--card-w) * .36), 40px); }
.card__corner { position: absolute; top: 3px; left: 4px; display: flex; gap: 1px; align-items: baseline; height: calc(var(--label-font, var(--corner-font)) + 3px); line-height: 1; letter-spacing: -.5px; font-size: var(--label-font, var(--corner-font)); font-weight: 750; white-space: nowrap; }
.card__suit { font-size: .93em; }
.card[data-tiny="true"] .card__corner { left: 2px; top: 1px; }
.card__center { position: absolute; top: 31%; left: 0; width: 100%; text-align: center; font-size: clamp(15px, calc(var(--card-w) * .4), 42px); opacity: .85; }
.card[data-last="false"] .card__center { visibility: hidden; }
.card[data-selected="true"] { outline: 3px solid #ec9d3b; outline-offset: -2px; box-shadow: 0 0 0 2px #d17f32; }
.card[data-valid="true"]:hover { filter: brightness(.98); }
.footer { flex: none; min-height: 43px; padding: 8px clamp(10px, 2vw, 24px); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fffdfb; border-top: 1px solid #e9d4db; font-size: 12px; color: #795965; }
#message { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer__tag { font-size: 10px; white-space: nowrap; color: #ae929e; }
.drag-ghost { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 10000; transform: translate3d(0,0,0); opacity: 1; filter: drop-shadow(0 8px 10px #30242b55); }
.drag-ghost .card { pointer-events: none; }
/* The dragged stack exists once on screen: the original nodes stay in the
   tableau for stable geometry, but disappear while their preview is flying. */
.card[data-drag-hidden="true"] { visibility: hidden !important; }
.win[hidden] { display: none; }
.win { position: fixed; inset: 0; z-index: 10010; background: #3d303d8d; display: grid; place-items: center; }
.win__panel { background: #fffaf4; padding: 32px; border-radius: 18px; text-align: center; box-shadow: 0 20px 60px #22121a55; }
.win__panel h2 { font-family: Georgia,serif; margin: 10px 0; }
@media(max-width: 850px) { :root { --columns-gap: 6px; } .topbar { padding: 6px 9px; } .brand strong { font-size: 17px; } .brand small { font-size: 9px; } .brand__flower { font-size: 22px; } .draw-setting { font-size: 11px; } button, select { padding: 6px 8px; font-size: 12px; } .infobar { font-size: 10px; padding: 4px 8px; } .play-area { padding: 6px 6px 0; } .footer { padding: 5px 8px; min-height: 36px; } .footer__tag { display: none; } .card__corner { left: 2px; top: 2px; letter-spacing: -.5px; } }
@media(max-width: 540px) { :root { --columns-gap: 3px; } .topbar { gap: 4px; } .brand strong { font-size: 13px; } .brand small { display: none; } .brand__flower { display: none; } .topbar__right { gap: 3px; } button,select { font-size: 10px; padding: 5px; } .draw-setting { gap: 2px; font-size: 10px; } .infobar .instructions { display: none; } .infobar { justify-content: center; } .footer { font-size: 10px; } .pile .placeholder { font-size: 19px; top: calc(var(--card-h) / 2 - 12px); } }
@media(max-height: 470px) { .topbar { padding-top: 3px; padding-bottom: 3px; } .infobar { padding-top: 2px; padding-bottom: 2px; } .play-area { padding-top: 4px; } .footer { min-height: 26px; padding-top: 3px; padding-bottom: 3px; } }
.recycle-mark { position:absolute; display:grid; place-items:center; width:var(--card-w); height:var(--card-h); font-size:42px; font-weight:700; color:#c16e89; }
body.dragging,body.dragging * { cursor:grabbing!important; }

/* Source: rosy-theme.css */
@font-face{font-family:Fraunces;src:url('/assets/fonts/fraunces.woff2') format('woff2');font-display:swap;font-weight:100 900}
@font-face{font-family:Manrope;src:url('/assets/fonts/manrope.woff2') format('woff2');font-display:swap;font-weight:200 800}
:root{--ink:#36563d;--tile-border:#fff0d7;--tile-shadow:0 3px 5px #5b492c49,inset 0 1px 0 #fff9ed;--tile:linear-gradient(156deg,#fff2df,#fce5c9);--columns-gap:clamp(4px,.75vw,12px);font-family:Manrope,system-ui,sans-serif;color:var(--ink);background:#a1a682}
.scene{position:fixed;z-index:-1;inset:0;pointer-events:none;background:#a1a682 url('/assets/room-tablet.webp') no-repeat left bottom/cover}
@media(orientation:landscape){.scene{background-image:url('/assets/room-wide.webp')}}
@media(max-width:620px) and (orientation:portrait){.scene{background-image:url('/assets/room-phone.webp')}}
body[data-background=office] .scene{background-image:url('/assets/backgrounds/office-phone.webp')}
body[data-background=cafe] .scene{background-image:url('/assets/backgrounds/cafe-phone.webp')}
body[data-background=park] .scene{background-image:url('/assets/backgrounds/park-phone.webp')}
@media(min-aspect-ratio:9/10){body[data-background=office] .scene{background-image:url('/assets/backgrounds/office-tablet.webp')}body[data-background=cafe] .scene{background-image:url('/assets/backgrounds/cafe-tablet.webp')}body[data-background=park] .scene{background-image:url('/assets/backgrounds/park-tablet.webp')}}
@media(min-aspect-ratio:8/5){body[data-background=office] .scene{background-image:url('/assets/backgrounds/office-wide.webp')}body[data-background=cafe] .scene{background-image:url('/assets/backgrounds/cafe-wide.webp')}body[data-background=park] .scene{background-image:url('/assets/backgrounds/park-wide.webp')}}
body[data-theme=rose] .scene{filter:hue-rotate(-18deg) saturate(.92)}body[data-theme=midnight] .scene{filter:hue-rotate(32deg) saturate(.86) brightness(.82)}body[data-theme=evening] .scene{filter:sepia(.28) saturate(1.1) brightness(.9)}
.app{position:relative;height:100dvh;min-height:270px;overflow:hidden;background:transparent}
.topbar{position:relative;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;border:0;background:transparent;padding:clamp(5px,.8vh,10px) clamp(10px,2vw,34px);min-height:58px}
.brand{justify-self:start;display:flex;align-items:center;gap:4px;min-height:46px;border:1px solid var(--tile-border);border-radius:60px;padding:3px 12px 3px 4px;background:var(--tile);box-shadow:var(--tile-shadow)}
.brand img{width:35px;height:35px;object-fit:contain}.brand strong{font-family:Fraunces,Georgia,serif;font-size:clamp(15px,1.6vw,23px);font-style:italic;font-weight:760;line-height:1;color:#a93325}.brand small{font:600 11px/1.1 Fraunces,serif;text-align:center;color:#466147}
.title-ribbon{position:relative;display:flex;align-items:center;gap:8px;margin:0;padding:5px 13px;border-radius:50px;background:var(--tile);box-shadow:var(--tile-shadow);font:700 clamp(17px,2.15vw,30px)/1.1 Fraunces,Georgia,serif;letter-spacing:-.02em;white-space:nowrap;color:var(--ink)}
.title-ribbon:before,.title-ribbon:after{content:'';position:absolute;z-index:-1;top:22%;bottom:22%;width:22px;background:#ffeace;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,35% 50%)}
.title-ribbon:before{left:-13px}.title-ribbon:after{right:-13px;transform:scaleX(-1)}
.title-ribbon .icon{width:clamp(17px,2.1vw,29px);height:34px;color:#426346}.title-ribbon .icon:last-child{transform:scaleX(-1)}
.topbar__right{justify-self:end;position:relative;display:flex;align-items:center;gap:8px}
.topbar button,.topbar select{background:var(--tile);border:1px solid var(--tile-border);box-shadow:var(--tile-shadow);color:var(--ink)}
.draw-setting{display:flex;gap:7px;align-items:center;border-radius:30px;background:var(--tile);border:1px solid var(--tile-border);box-shadow:var(--tile-shadow);padding:4px 4px 4px 10px;font-weight:750;font-size:13px;color:#36563d}
.draw-setting select{padding:4px 6px;min-width:42px;border:0;box-shadow:none;background:transparent}
.circle-button{width:42px;height:42px;display:grid;place-items:center;padding:8px;border-radius:50%}.icon{display:inline-block;width:1.3em;height:1.3em;flex:none}
.appearance-panel[hidden]{display:none}.appearance-panel{position:absolute;z-index:80;top:calc(100% + 8px);right:0;width:220px;display:grid;gap:12px;padding:12px;border-radius:17px;background:#fff1dc;box-shadow:0 8px 25px #3339;border:1px solid #f6e7ca}
.appearance-panel label{display:grid;gap:4px;font-size:12px;font-weight:800}.appearance-panel select{width:100%;padding:7px}
.infobar{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;padding:0}
.play-area{padding:12px clamp(7px,2vw,30px) 0;flex:1;min-height:0;align-items:stretch}
.board{width:min(100%,940px);height:100%;}
.top-row{height:calc(var(--card-h) + clamp(10px,2.4vh,27px));}
.stock:before,.waste:before,.foundation:before,.column:before{border:2px solid #fff1d8cb;border-radius:calc(var(--card-w) / 12);background:linear-gradient(132deg,#5d6b3d30,#66744d17)}
.foundation .placeholder{font-family:Fraunces,serif;font-size:clamp(16px,2.65vw,34px);font-weight:700;color:#f4e5c6b3;top:calc(var(--card-h)/2 - 18px)}
.foundation[data-suit=hearts] .placeholder{color:#ffc09c}
.card{border:1px solid #f1d7b9;background:linear-gradient(148deg,#fff2df 18%,#fce6ca 120%);box-shadow:0 4px 7px #5540213d,0 1px 3px #55402146,inset 0 1px 0 #fffcf0;font-family:Fraunces,Georgia,serif;color:#2b303f}
.card[data-color=red]{color:#c43323}
.card.back{border:1px solid #f1d7b9;background:linear-gradient(148deg,#fff2df 18%,#fce6ca 120%);box-shadow:0 4px 7px #5540213d,0 1px 3px #55402146}
.card.back:after{content:'';position:absolute;inset:4%;border:0;border-radius:calc(var(--card-w) / 17);background:#e57e6c url('/assets/card-back.svg') no-repeat center/100% 100%}
.card__corner{top:4%;left:7%;display:flex;flex-direction:column;gap:0;align-items:center;justify-content:flex-start;font-family:Fraunces,Georgia,serif;line-height:.89;letter-spacing:-.04em;font-weight:740;font-size:var(--label-font,var(--corner-font))}
.card__corner-suit{width:.49em;height:.49em;margin-top:1px;overflow:visible}.card__top-suit{position:absolute;top:5%;right:7%;width:26%;height:26%}
.card__center{position:absolute;top:0;left:0;width:100%;height:100%;font-size:inherit;opacity:1}
.card__pip{position:absolute;left:var(--pip-x);top:var(--pip-y);width:20%;height:20%;transform:translate(-50%,-50%) rotate(var(--pip-flip,0deg));overflow:visible}
.card__pip--ace{width:47%;height:47%}.card__portrait{position:absolute;bottom:0;left:2%;width:96%;height:79%;object-fit:contain;object-position:center bottom;pointer-events:none}
/* In tableau, covered face-up cards retain the visible top-right suit.
   Only the middle illustration/pips are hidden behind the next card. */
.card[data-last=false] .card__center{visibility:hidden}
.card[data-tiny=true] .card__corner{flex-direction:row;gap:1px;left:2px;top:0}.card[data-tiny=true] .card__corner-suit{width:.7em;height:.7em;margin-top:0}
/* Draw 3 cards keep their complete artwork, even when partially overlapped. */
.card[data-selected=true]{outline:3px solid #f3b55a;outline-offset:-3px;box-shadow:0 0 0 2px #ae8a4c}
.action-dock{flex:none;align-self:center;display:flex;gap:clamp(4px,.8vw,12px);align-items:center;justify-content:center;max-width:calc(100% - 12px);margin:0 auto 4px;padding:5px clamp(7px,.9vw,16px);border:1px solid #fff0d7;background:#f9edddbf;backdrop-filter:blur(8px);border-radius:70px;box-shadow:var(--tile-shadow);min-height:53px}
.action-dock .dock-button{font:700 clamp(11px,1.45vw,19px)/1 Fraunces,Georgia,serif;white-space:nowrap;display:flex;align-items:center;justify-content:center;gap:8px;min-width:clamp(90px,14.5vw,187px);height:42px;padding:6px 10px;border:1px solid var(--tile-border);border-radius:50px;background:var(--tile);box-shadow:var(--tile-shadow);color:var(--ink)}
.action-dock .dock-button.primary{background:#eb8778;color:#fff;border-color:#f6b9a9;text-shadow:0 1px 0 #9d6655}.action-dock .dock-button .icon{height:1.3em;width:1.3em}
.sr-only{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.win__panel{background:#fff2df;color:#36563d}.win__panel h2{font-family:Fraunces,Georgia,serif}
@media(max-width:900px){.topbar{padding:5px 9px;min-height:48px}.brand{min-height:35px;padding:2px 7px 2px 2px}.brand img{width:30px;height:30px}.title-ribbon{font-size:clamp(15px,2.2vw,20px)}.title-ribbon .icon{height:26px;width:17px}.draw-setting{font-size:11px}.circle-button{width:34px;height:34px}.action-dock{min-height:42px}.action-dock .dock-button{height:33px;min-width:clamp(60px,15vw,140px);font-size:clamp(10px,1.5vw,16px);gap:4px}.play-area{padding-top:5px}.top-row{height:calc(var(--card-h) + 9px)}}
@media(max-width:620px){.topbar{grid-template-columns:1fr auto;min-height:41px}.brand{display:none}.title-ribbon{justify-self:start;white-space:nowrap;font-size:clamp(13px,3.7vw,20px);padding:4px 6px;gap:3px}.title-ribbon .icon{width:12px;height:20px}.topbar__right{gap:3px}.draw-setting{padding:2px;gap:1px}.draw-setting select{padding:3px 1px}.action-dock{gap:3px;padding:3px;max-width:calc(100% - 4px)}.action-dock .dock-button{min-width:0;width:auto;padding:5px 6px;font-size:clamp(8px,2.15vw,12px);gap:3px}.action-dock .dock-button .icon{width:13px;height:13px}.play-area{padding:4px 5px 0}.top-row{height:calc(var(--card-h) + 7px)}}
@media(max-height:470px){.topbar{min-height:30px;padding-top:1px;padding-bottom:1px}.title-ribbon .icon{height:15px}.action-dock{min-height:27px;padding:2px;margin-bottom:1px}.action-dock .dock-button{height:23px;padding:2px 4px}.play-area{padding-top:1px}.top-row{height:calc(var(--card-h) + 5px)}}
/* Keep artwork visible behind the self-contained game layer. */
.scene{z-index:0}
.app{z-index:1}

/* Stage 5: user settings and legal move guidance; no geometry changes. */
.appearance-panel{width:min(295px,calc(100vw - 18px));max-height:min(76dvh,580px);overflow-y:auto;gap:10px;z-index:120}
.settings-divider{height:1px;background:#d9be9b;margin:2px 0}
.settings-heading{font:800 13px/1.2 Manrope,system-ui,sans-serif;color:#355a3d}
.appearance-panel label.settings-toggle{display:flex;align-items:flex-start;gap:9px;cursor:pointer;font:700 12px/1.4 Manrope,system-ui,sans-serif}
.settings-toggle input[type=checkbox]{appearance:auto;accent-color:#557552;flex:none;margin:2px 0;width:17px;height:17px;cursor:pointer}
.settings-toggle span{display:block;white-space:normal}
.settings-toggle small{display:block;font-size:10px;font-weight:500;line-height:1.4;color:#806c57;margin-top:2px}
.board[data-motion] .card {will-change:transform}
body[data-dim-illegal=true] .card.face[data-dimmed=true]{filter:grayscale(1) brightness(.75) contrast(.91);opacity:1;transition:filter .17s}
body[data-dim-illegal=true] [data-dest-kind=tableau][data-dimmed=true] .card,
body[data-dim-illegal=true] [data-dest-kind=foundation][data-dimmed=true] .card,
body[data-dim-illegal=true] [data-dest-kind=tableau][data-dimmed=true]:before,
body[data-dim-illegal=true] [data-dest-kind=foundation][data-dimmed=true]:before{filter:grayscale(1) brightness(.74) contrast(.92);opacity:1;transition:filter .18s}
/* Green marks the destination of the currently selected card; the source
   remains gold. This works with shading ON or OFF. No translucent cards. */
.board [data-dest-kind=tableau][data-valid=true]:before,
.board [data-dest-kind=foundation][data-valid=true]:before{
  border-color:#b4e7ad;box-shadow:0 0 0 2px #4f9459bd,0 0 12px #c4f4aa8a;
}
.board [data-valid=true] .card.face{filter:none!important;opacity:1!important}
@media(prefers-reduced-motion:reduce){.card,.pile,.column{transition:none!important}}

/* v0.7a: all flying cards remain opaque. Hidden real faces have no ghosting.
   Display-only classes; do not affect the geometry or engine data. */
.card[data-deal-hidden="true"],.card[data-flip-hidden="true"] {visibility:hidden!important}
.motion-deal-card,.motion-flip-back {box-sizing:border-box;opacity:1!important;transform-origin:center center;backface-visibility:hidden;filter:drop-shadow(0 3px 4px #2f2a2140)}
.foundation-sparkle {position:absolute;z-index:80;pointer-events:none;display:block;
  inset:-7%;border-radius:16px;border:2px solid #ffe1a0;
  background:radial-gradient(ellipse at center,#fff6cc92 0%,#ffdc8562 42%,transparent 72%);
  box-shadow:0 0 14px #fff3bbcc,0 0 23px #f5d78c80;opacity:0}
.foundation-sparkle[data-strong="true"]{border-color:#ffdf8d;box-shadow:0 0 20px #fff0baff,0 0 30px #ffdb89b0}
@media(prefers-reduced-motion:reduce){.foundation-sparkle,.motion-deal-card,.motion-flip-back{display:none!important}}

/* v0.7c — accessible one-tap sound button, always on the game table. */
.topbar .sound-toggle[aria-pressed="true"]{color:#8e504b;background:linear-gradient(150deg,#f7ded3,#f9eadb);border-color:#efc8bc}
.sound-toggle .icon{width:1.35em;height:1.35em}
.topbar .sound-toggle:focus-visible,.topbar .appearance-btn:focus-visible{outline:3px solid #f3b75b;outline-offset:2px}
.appearance-panel label.speed-setting{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;font:800 12px/1.35 Manrope,system-ui,sans-serif}
.appearance-panel .speed-setting select{width:auto;min-width:96px;padding:7px 6px}
@media(max-width:620px){.sound-toggle .icon{width:16px;height:16px}}
@media(max-width:365px){.topbar__right{gap:2px}.topbar .circle-button{width:30px;height:30px;padding:6px}.title-ribbon{font-size:13px}.draw-setting{font-size:10px}}

/* v0.7e: opaque draw-one/draw-three flights and reversible waste collection. */
.card[data-draw-hidden="true"],.card[data-recycle-hidden="true"]{visibility:hidden!important}
.motion-draw-card{box-sizing:border-box;opacity:1!important;transform-origin:center center;backface-visibility:hidden;filter:drop-shadow(0 3px 5px #30291e45)}
.motion-recycle-card{transform-style:preserve-3d;pointer-events:none;filter:drop-shadow(0 3px 5px #30291e35)}
.motion-recycle-card .card{position:absolute;pointer-events:none;backface-visibility:hidden;overflow:hidden}
.motion-recycle-card .motion-recycle-back{transform:rotateY(180deg)}
@media(prefers-reduced-motion:reduce){.motion-draw-card,.motion-recycle-card{display:none!important}}
/* v0.7e.4: a green border on the destination CARD, not only the empty slot
   behind it. The slot border was concealed by full-size cards. */
.board .column[data-valid=true] .column__cards>.card:last-child,
.board .foundation[data-valid=true] .pile__cards>.card:last-child{
  outline:3px solid #69b77a;outline-offset:1px;
  box-shadow:0 0 0 3px #dcf3d69c,0 0 16px #b5e7aab8;
}

/* v0.7f: visible only when a complete, verified winning plan is playing. */
.auto-collect-status[hidden]{display:none!important}
.auto-collect-status{position:absolute;z-index:70;bottom:clamp(48px,8vh,70px);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;white-space:nowrap;border:1px solid #f8e8c8;border-radius:28px;background:#ffeed9ee;color:#385f42;padding:6px 8px 6px 15px;box-shadow:0 3px 12px #4e392840;font:700 12px Manrope,system-ui,sans-serif}
.auto-collect-status button{border-radius:18px;background:#e8a69a;border:1px solid #f2c3b5;padding:5px 14px;color:#4a3d36;font-size:12px}
@media(max-height:470px){.auto-collect-status{bottom:29px;padding:2px 4px 2px 9px;font-size:10px}.auto-collect-status button{padding:3px 9px;font-size:10px}}

/* RosyGames branding: wordmark is visual only, no card or layout changes. */
.brand.brand--wordmark{padding:2px 10px;min-height:46px;box-sizing:border-box}
.mobile-brand-mark{display:none}
.brand.brand--wordmark .brand__logo{display:block;width:164px;height:auto;max-height:44px;object-fit:contain}
@media(max-width:900px){.brand.brand--wordmark{min-height:35px;padding:2px 6px}.brand.brand--wordmark .brand__logo{width:125px;max-height:34px}}
@media(max-width:620px){.mobile-brand-mark{display:block;width:18px;height:18px;flex:none;object-fit:contain}.title-ribbon>.icon:first-child{display:none}}
@media(max-width:365px){.mobile-brand-mark{width:14px;height:14px}}

/* v0.7f.1: contextual Klondike mode selector and Settings gear.
   Spider will use a separate "Suits: 1 / 2 / 4" configuration when added. */
.draw-setting__label{white-space:nowrap}
.draw-setting select{min-width:67px;text-align:left;cursor:pointer}
.settings-btn .icon{width:22px;height:22px;stroke-width:1.8}
.settings-btn:focus-visible,.draw-setting:focus-within{outline:2px solid #557552;outline-offset:2px}
@media(max-width:620px){.draw-setting{padding:2px 2px 2px 7px}.draw-setting__label{font-size:10px}.draw-setting select{min-width:59px;padding:3px 0;font-size:10px}.settings-btn .icon{width:18px;height:18px}}
@media(max-width:365px){.draw-setting{padding-left:4px}.draw-setting select{min-width:55px;font-size:9px}}
/* Compact title is essential when the game mode and two round controls share a 320px phone. */
@media(max-width:365px){
 .topbar{gap:4px;padding-left:5px;padding-right:5px}
 .title-ribbon{font-size:12px;padding:4px 5px;gap:2px}
 .title-ribbon .icon:last-child{display:none}
 .topbar__right{gap:2px}
 .draw-setting{gap:0}
 .draw-setting select{min-width:51px;font-size:9px}
}

/* v0.7f.2 — quiet card depth. Only static, small CSS box-shadows: no blur()
   filters, no constantly animating glow, and no transform/position changes.
   All shadows follow the actual card rectangle, including the stock and waste. */
:root {
  --rosy-card-depth: 0 1px 2px #34291d45,
    0 5px 11px #30261942,
    0 0 0 1px #80694c30,
    inset 0 1px 0 #ffffffb5;
  --rosy-card-depth-top: 0 2px 4px #34291d50,
    0 8px 15px #30261949,
    0 0 0 1px #80694c38,
    inset 0 1px 0 #ffffffd6;
}
.board .card,
.board .card.back {
  border-color: #f8e7cf;
  box-shadow: var(--rosy-card-depth);
}
/* Slightly more lift only for exposed end cards; covered cards retain a
   smaller shadow so the overlap spacing does not look artificially deep. */
.board .card[data-last="true"] {
  box-shadow: var(--rosy-card-depth-top);
}
/* Selection and legal-target highlights still win over ordinary depth. */
.board .card[data-selected="true"] {
  box-shadow: 0 0 0 2px #bc9653,
    0 4px 9px #33281d55,
    0 8px 15px #30261930,
    inset 0 1px 0 #ffffffd6;
}
.board .column[data-valid="true"] .column__cards > .card:last-child,
.board .foundation[data-valid="true"] .pile__cards > .card:last-child {
  box-shadow: 0 0 0 3px #dcf3d69c,
    0 0 12px #b5e7aa92,
    0 5px 12px #3026193d,
    inset 0 1px 0 #ffffffd6;
}
/* Only hovering a fully exposed playable card can add a warm accent.
   Touch screens never pay for this hover state. */
@media (hover: hover) and (pointer: fine) {
  .board .card.face[data-last="true"]:hover:not([data-dimmed="true"]):not([data-selected="true"]) {
    box-shadow: 0 2px 4px #34291d55,
      0 9px 16px #30261950,
      0 0 0 1px #fff8e5dd,
      0 0 6px #fff4ce72,
      inset 0 1px 0 #ffffffe0;
  }
}
/* Remove the original drop-shadow filter on the entire moving stack.
   That filter requires reprocessing an offscreen raster every pointer move.
   Per-card static shadows retain the lifted look without that extra pass. */
.drag-ghost { filter: none; }
.drag-ghost .card,
.drag-ghost .card.back {
  box-shadow: 0 3px 6px #30251a55,
    0 10px 18px #30251a52,
    0 0 0 1px #fff8e5c2,
    inset 0 1px 0 #ffffffd6;
}


/* v0.7f.3 — clearer rank and suit markings. Pure CSS: no card scaling,
   layout changes, filters or continuous animation. 
   Per-card --label-font still follows the compact tableau header geometry. */
.board .card.face .card__corner {
  top: 3%;
  left: 6%;
  font-size: calc(var(--label-font, var(--corner-font)) * 1.2);
  line-height: .89;
}
/* Larger suit directly under the upper-left rank. */
.board .card.face .card__corner-suit {
  width: .73em;
  height: .73em;
  margin-top: 1px;
}
/* Upper-right suit sits slightly closer to the upper edge. */
.board .card.face .card__top-suit { top: 2%; }
/* When packed so tightly that only a thin edge is exposed, preserve the
   established compact single-line header rather than growing into a stack. */
.board .card.face[data-tiny="true"] .card__corner {
  top: 0;
  left: 2px;
  font-size: var(--label-font, var(--corner-font));
}
.board .card.face[data-tiny="true"] .card__corner-suit {
  width: .7em;
  height: .7em;
  margin-top: 0;
}
/* Draw 3 uses the SAME corner type size as every other exposed card.
   The fan itself provides sufficient horizontal space for the rank/suit. */

/* v0.7f.4 — sharper card edges and more legible corner marks.
   Only paint-level changes (static border and font sizing). Keep the proven
   tiny/covered-card exceptions from v0.7f.3 to protect dense tableaux. */
.board .card,
.board .card.back,
.drag-ghost .card {
  border-color: #aa9278;
}
.board .card.face .card__corner {
  font-size: calc(var(--label-font, var(--corner-font)) * 1.27);
}
.board .card.face .card__corner-suit {
  width: .79em;
  height: .79em;
}
.board .card.face .card__top-suit {
  top: 0%;
}


/* v0.7f.5 — drag preview uses exactly the same card markings as the board.
   The preview is appended to <body>, so selectors beginning with .board
   never matched it. Keep these rules synchronized with the main face styles.
   The --card-* / --corner-font variables are inherited from makeGhost(). */
.drag-ghost .card.face .card__corner {
  top: 3%;
  left: 6%;
  font-size: calc(var(--label-font, var(--corner-font)) * 1.27);
  line-height: .89;
}
.drag-ghost .card.face .card__corner-suit {
  width: .79em;
  height: .79em;
  margin-top: 1px;
}
.drag-ghost .card.face .card__top-suit { top: 0%; }
/* Keep the same protective compact heading in tightly packed columns. */
.drag-ghost .card.face[data-tiny="true"] .card__corner {
  top: 0;
  left: 2px;
  font-size: var(--label-font, var(--corner-font));
}
.drag-ghost .card.face[data-tiny="true"] .card__corner-suit {
  width: .7em;
  height: .7em;
  margin-top: 0;
}

/* v0.7f.6 — deal ID inside existing Settings: no layout shift on the table. */
.deal-code-row{display:flex;align-items:center;gap:7px;max-width:100%}
.deal-code-row input{min-width:0;flex:1;font:600 12px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.025em;padding:8px 6px;border:1px solid #baa38d;border-radius:8px;color:#563e33;background:#fffaf0}
.deal-code-row button{flex:none;white-space:nowrap;padding:8px 9px;font-size:11px;border-radius:8px}
.deal-code-note{display:block;line-height:1.45;opacity:.8;margin-top:5px}


/* v0.7f.6d — temporarily show the face directly under a dragged tableau
   suffix. Without this, data-last=false hides its portrait and right suit
   until the move is committed. A single attribute is added during drag and
   removed on success, cancellation, or failed-drop return. No animation. */
.board .column .card.face[data-drag-exposed="true"] .card__center,
.board .column .card.face[data-drag-exposed="true"] .card__top-suit {
  visibility: visible;
}


/* v0.7f.6g — one-time desktop keyboard tip, anchored above stock.
   No layout shift, no animation or blur. Invisible to touch-only devices. */
.space-tip[hidden] { display: none !important; }
.space-tip.space-tip--overlay { position: fixed; top: 0; bottom: auto; z-index: 10000; pointer-events: auto; }
.space-tip { display: flex; position: absolute; bottom: calc(100% + 6px);
  left: calc(var(--card-w) / 2); transform: translateX(-50%); z-index: 95;
  align-items: center; gap: 12px; padding: 5px 6px 5px 11px;
  max-width: calc(100vw - 18px); white-space: nowrap;
  color: #385941; border: 1px solid #e9cbaa; border-radius: 18px;
  background: #fff1da; box-shadow: 0 3px 9px #382c2540;
  font: 650 12px/1.2 Manrope, system-ui, sans-serif; }
.space-tip kbd { display: inline-block; font: 750 11px/1 ui-sans-serif,system-ui,sans-serif;
  border: 1px solid #d7b994; border-radius: 5px; background: #fffaf0;
  padding: 4px 6px; }
.space-tip button { flex: none; display: grid; place-items: center;
  min-width: 25px; min-height: 25px; padding: 0; border-radius: 50%;
  border: 0; background: transparent; box-shadow: none; color: #8a6153;
  font: 700 19px/1 system-ui,sans-serif; cursor: pointer; }
.space-tip button:hover, .space-tip button:focus-visible { color: #a63e37; background: #f6decc; }
@media not all and (hover: hover) { .space-tip { display: none !important; } }
@media (pointer: coarse) { .space-tip { display: none !important; } }


/* v0.7f.6i — two game-discovery menus flanking the title ribbon.
   Placeholder entries are deliberately not links until games exist. */
.topbar { z-index: 110; }
.game-navigation { position: relative; z-index: 2; justify-self: center; display: flex;
  align-items: center; justify-content: center; gap: clamp(8px, 1.1vw, 18px); min-width: 0; }
.game-navigation .title-ribbon { flex: none; }
.game-menu { position: relative; flex: none; }
.topbar .game-menu__toggle { display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #f5dfbf; border-radius: 24px; background: var(--tile);
  box-shadow: var(--tile-shadow); color: var(--ink); cursor: pointer;
  font: 750 clamp(12px, 1.0vw, 15px)/1 Fraunces, Georgia, serif;
  min-height: 34px; padding: 7px 13px; }
.topbar .game-menu__toggle:hover, .topbar .game-menu__toggle[aria-expanded="true"] {
  background: #fff9eb; border-color: #d5b68e; }
.topbar .game-menu__toggle:focus-visible { outline: 2px solid #446b48; outline-offset: 3px; }
.game-menu__compact { display: none; }
.game-menu__panel[hidden] { display: none !important; }
.game-menu__panel { position: absolute; z-index: 140; top: calc(100% + 10px);
  width: 245px; max-width: calc(100vw - 20px); padding: 12px;
  border: 1px solid #ead3b8; border-radius: 15px; background: #fff2df;
  box-shadow: 0 11px 30px #332d2042; }
.game-menu--similar .game-menu__panel { left: 0; }
.game-menu--more .game-menu__panel { right: 0; }
.game-menu__heading { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 2px 5px 9px; color: #34553b;
  font: 800 13px/1.25 Manrope, system-ui, sans-serif; }
.game-menu__heading span { color: #a56f5b; font: 700 10px/1.2 Manrope, system-ui, sans-serif;
  white-space: nowrap; }
.game-menu__items { list-style: none; margin: 0; padding: 0; }
.game-menu__items li { padding: 8px 10px; border-radius: 8px; color: #697365;
  font: 650 12px/1.25 Manrope, system-ui, sans-serif; }
.game-menu__items li + li { border-top: 1px solid #e8d9c6a8; }
@media (max-width: 1190px) {
  .game-navigation { gap: 5px; }
  .topbar .game-menu__toggle { font-size: 12px; padding: 6px 8px; min-height: 30px; }
  .title-ribbon { font-size: clamp(16px, 1.85vw, 24px); }
}
@media (max-width: 900px) {
  .topbar { gap: 5px; }
  .game-navigation { gap: 3px; }
  .topbar .game-menu__toggle { padding: 5px 7px; font-size: 11px; min-height: 29px; }
  .game-navigation .title-ribbon { font-size: clamp(15px, 2.1vw, 20px); }
}
@media (max-width: 700px) {
  .game-menu__label { display: none; }
  .game-menu__compact { display: inline-block; font: 700 22px/1 Georgia, serif; }
  .topbar .game-menu__toggle { width: 29px; height: 30px; padding: 0; }
  .game-menu__panel { width: 216px; }
}
@media (max-width: 620px) {
  .game-navigation { justify-self: start; gap: 2px; }
  .game-navigation .title-ribbon { padding: 4px 7px; }
  .game-navigation .title-ribbon .icon:last-child { display: none; }
  .game-navigation .title-ribbon .mobile-brand-mark { display: none; }
  .game-menu__panel { position: fixed; left: 8px !important; right: 8px !important;
    top: 48px; width: auto; max-width: none; }
}
/* Keep the complete visible H1 on phones; never substitute a short title. */
@media (max-width: 450px) {
  .game-navigation .title-ribbon {
    font-size: clamp(11px, 2.9vw, 13px);
    letter-spacing: -.035em;
    padding: 4px 6px;
  }
  .topbar .game-menu__toggle { width: 27px; height: 28px; }
  .game-menu__panel { top: 42px; }
}
/* v0.7f.7g: one-line mobile header, including narrow phones.
   Preserve the full H1 and the three gameplay controls. */
@media (max-width: 390px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 2px;
    min-height: 35px; padding: 3px 4px; }
  .game-navigation { justify-self: start; min-width: 0; gap: 1px; }
  .game-navigation .title-ribbon { font-size: clamp(13px, 3.9vw, 15px);
    letter-spacing: -.045em; padding: 3px 6px; }
  .topbar .game-menu__toggle { width: 23px; height: 26px; min-height: 26px; font-size: 17px; }
  .game-menu__compact { font-size: 19px; }
  .topbar__right { justify-self: end; gap: 2px; }
  .topbar .circle-button { width: 26px; height: 26px; padding: 4px; }
  .topbar .circle-button .icon { width: 16px; height: 16px; }
  .draw-setting { padding: 1px 2px 1px 4px; gap: 1px; }
  .draw-setting__label { font-size: 9px; }
  .draw-setting select { min-width: 50px; font-size: 9px; padding: 2px 0; }
}
@media (max-width: 335px) {
  .topbar { gap: 1px; padding-left: 2px; padding-right: 2px; }
  .game-navigation .title-ribbon { font-size: 12px; padding: 2px 4px; }
  .topbar .game-menu__toggle { width: 21px; height: 25px; }
  .draw-setting { padding-left: 2px; }
  .draw-setting__label { display: none; }
  .draw-setting select { min-width: 49px; }
}
@media (max-height: 470px) {
  .game-menu__panel { max-height: calc(100dvh - 72px); overflow-y: auto; }
  .topbar .game-menu__toggle { min-height: 25px; }
}


/* v0.7f.6k — search-readable, genuinely useful game guide below the
   100dvh game. The board, card sizing and drag controls are unchanged. */
.seo-content { position: relative; z-index: 3; isolation: isolate;
  background: #fff8ed; border-top: 1px solid #e9d8bf;
  color: #35503e; font: 400 15px/1.75 Manrope, system-ui, sans-serif;
  padding: clamp(34px, 6vw, 76px) 18px 24px; }
.seo-content__inner { max-width: 1040px; margin: 0 auto; }
.seo-content h2, .seo-content h3 { color: #355b40; font-family: Fraunces, Georgia, serif; line-height: 1.23; }
.seo-content h2 { margin: 0 0 17px; font-size: clamp(27px, 3.5vw, 40px); }
.seo-content h3 { margin: 30px 0 12px; font-size: clamp(21px, 2.5vw, 26px); }
.seo-content p { margin: 0 0 16px; }
.seo-content__intro { max-width: 780px; margin: 0 0 32px; }
.seo-content .seo-content__eyebrow { color: #ae6c60; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.seo-content__back { display: inline-block; margin-top: 4px; font-weight: 800; color: #9e3e33; text-decoration: underline; text-underline-offset: 3px; }
.seo-content__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 310px); gap: clamp(24px, 5vw, 62px); align-items: start; }
.seo-content ol, .seo-content ul { margin: 8px 0 22px; padding-left: 24px; }
.seo-content li { margin: 0 0 10px; }
.seo-content__aside { background: #f5ead8; border: 1px solid #ead8c2; border-radius: 18px; padding: 2px 22px 22px; }
.seo-content__aside h3 { font-size: 23px; }
.seo-content__faq { border-top: 1px solid #e5d4bb; margin-top: 30px; padding-top: 14px; }
.seo-content__faq dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 35px; margin: 15px 0 30px; }
.seo-content__faq dl>div { margin: 0; }
.seo-content__faq dt { font-weight: 800; color: #36573f; margin-bottom: 4px; }
.seo-content__faq dd { margin: 0; }
.seo-content .seo-content__foot { text-align: center; border-top: 1px solid #e5d4bb; padding-top: 17px; color: #887664; font-size: 12px; }
@media (max-width: 740px) {
  .seo-content__layout { grid-template-columns: 1fr; gap: 10px; }
  .seo-content__faq dl { grid-template-columns: 1fr; }
  .seo-content { font-size: 14px; line-height: 1.7; }
  .seo-content__aside { padding: 0 17px 14px; }
}

/* RosyGames v0.7f.6l: portal discovery controls; no layout changes while closed. */
.portal-menu-action,.portal-menu-link{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:3px 0;background:none;border:0;text-align:left;font:inherit;color:inherit;text-decoration:none;cursor:pointer}
.portal-menu-action span,.portal-menu-link span{color:#ae705d;font-size:10px;font-weight:800}
.portal-menu-action:hover,.portal-menu-link:hover{color:#385c3e;text-decoration:underline}
.portal-menu-action:focus-visible,.portal-menu-link:focus-visible{outline:2px solid #457750;outline-offset:2px;border-radius:4px}
.home-game-preview[hidden]{display:none!important}
.home-game-preview{position:absolute;z-index:105;inset:56px 0 54px;display:grid;place-items:center;padding:16px;background:#25341d88}
.home-game-preview__card{width:min(480px,calc(100vw - 32px));padding:clamp(22px,4vw,36px);border-radius:20px;border:1px solid #efd6b9;background:#fff4e4;color:#36563e;text-align:center;box-shadow:0 16px 40px #17251566}
.home-game-preview__card h2{font:700 clamp(25px,3vw,34px)/1.2 Fraunces,Georgia,serif;margin:10px 0}
.home-game-preview__card p{font:450 14px/1.6 Manrope,system-ui,sans-serif;margin:10px 0 23px}
.home-game-preview__eyebrow{font:800 11px/1.4 Manrope,system-ui,sans-serif;text-transform:uppercase;letter-spacing:.06em;color:#b26f5f}
#home-game-preview-close{border-radius:40px;padding:10px 20px;background:#e88578;border:1px solid #f4b5a7;color:#fff;font-weight:800;cursor:pointer}
#home-game-preview-close:focus-visible{outline:3px solid #30583a;outline-offset:3px}
@media(max-height:470px){.home-game-preview{inset:37px 0 35px}.home-game-preview__card{padding:12px 20px}.home-game-preview__card h2{font-size:22px}.home-game-preview__card p{margin:5px 0 10px}}

/* v0.7f.6u — two compact plain-text rows directly to the right of Undo.
   Top: Moves. Bottom: Won and win rate. Never an interactive button. */
.action-dock .dock-readouts {
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center;
  gap:2px; height:42px; min-width:0; padding:0 5px;
  font:700 clamp(11px,1.12vw,14px)/1.05 Fraunces,Georgia,serif;
  color:var(--ink); white-space:nowrap; font-variant-numeric:tabular-nums;
  background:none; border:0; border-radius:0; box-shadow:none;
  cursor:default; user-select:text;
}
.action-dock .dock-readout { display:inline-flex; align-items:baseline; gap:.28em; white-space:nowrap; }
.action-dock .dock-readout output { font:inherit; font-variant-numeric:tabular-nums; }
.action-dock .dock-readouts__percent-separator { opacity:.45; margin:0 .08em; }
@media (max-width:900px) {
  .action-dock .dock-readouts {height:33px; gap:2px; font-size:clamp(10px,1.3vw,12px);}
}
@media (max-width:620px) {
  .action-dock {gap:3px; padding:3px; max-width:calc(100% - 4px);}
  .action-dock .dock-button {padding:5px 6px; min-width:0; width:auto; font-size:clamp(8px,2.15vw,12px); gap:3px;}
  .action-dock .dock-button .icon {width:13px; height:13px;}
  .action-dock .dock-readouts {gap:1px; padding:0 2px; font-size:clamp(9px,2.35vw,11px);}
  .action-dock .dock-readout {gap:.18em;}
}
@media (max-width:370px) {
  .action-dock .dock-button .icon {width:10px; height:10px;}
  .action-dock .dock-readouts {padding:0; font-size:9px;}
}
@media (max-height:470px) {
  .action-dock .dock-readouts {height:23px; gap:0; font-size:clamp(9px,1.25vw,11px);}
}

/* v0.7f.6s — trial warm brown card outline, replacing the black experiment.
   This is deliberately isolated at the end of the stylesheet for easy rollback.
   Preserve all original art, shading of unavailable moves, sizes and card layout.
   Exclude decorative UI and empty slots. */
.board .card,
.board .card.back,
.drag-ghost .card,
.drag-ghost .card.back,
.motion-recycle-card .card {
  border: 2px solid #89544a;
  box-shadow: none !important;
}
/* Drag/deal motion wrappers also had independent raster drop-shadows. */
.drag-ghost,
.motion-deal-card,
.motion-flip-back,
.motion-draw-card,
.motion-recycle-card {
  filter: none !important;
}
/* Selection and legal-drop cues remain as flat outlines, not glows. */
.board .card[data-selected="true"] {
  outline: 3px solid #c58a37;
  outline-offset: -2px;
}
.board .column[data-valid="true"] .column__cards > .card:last-child,
.board .foundation[data-valid="true"] .pile__cards > .card:last-child {
  outline: 3px solid #4c9d57;
  outline-offset: 1px;
}

/* Compact screens: a 1px outline stays legible without heavy black bands.
   Applies to both the tabletop and the detached drag/recycle cards. */
@media (max-width: 760px) {
  .board .card,
  .board .card.back,
  .drag-ghost .card,
  .drag-ghost .card.back,
  .motion-recycle-card .card {
    border-width: 1px;
  }
}

/* v0.7f.6v: avoid a live backdrop blur behind the mobile footer.
   Slightly more opaque cream gives a similar appearance without sampling
   the scene while cards move above it. Desktop styling is unchanged. */
@media (max-width: 760px) {
  .action-dock {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #f9edddee;
  }
}

/* v0.7f.6w — compact seven-column board.
   Grid tracks fill the board width, so reducing column-gap alone would
   make tracks WIDER rather than bring cards closer. Limit the desktop
   board width while keeping the top stock/foundation row perfectly aligned
   with the seven tableau columns. Smaller screens remain fluid at 100%.
   Card sizes and vertical overlap are unchanged. */


/* v0.7f.6y — stock on right by default on ALL devices; Left remains
   a saved manual choice. Keep the top row aligned with the seven tableau
   columns; leave all column widths and card dimensions untouched. */
.board[data-stock-side="right"] .top-row > .foundation[data-suit="clubs"] { order: 1; }
.board[data-stock-side="right"] .top-row > .foundation[data-suit="diamonds"] { order: 2; }
.board[data-stock-side="right"] .top-row > .foundation[data-suit="hearts"] { order: 3; }
.board[data-stock-side="right"] .top-row > .foundation[data-suit="spades"] { order: 4; }
.board[data-stock-side="right"] .top-row > .spacer { order: 5; }
.board[data-stock-side="right"] .top-row > .waste { order: 6; }
.board[data-stock-side="right"] .top-row > .stock { order: 7; }
/* In Draw 3 the face-up waste fans toward the free spacer on its LEFT;
   it must not overlap the stock at the right edge. */
/* Older cards must be LEFT of the active card, so their rank/suit corners
   remain visible. On a right-hand stock the top card stays on the waste slot. */
.board[data-stock-side="right"] .waste .card[data-waste-slot="0"] { left: calc(0px - var(--waste-fan-double)); }
.board[data-stock-side="right"] .waste .card[data-waste-slot="1"] { left: calc(0px - var(--waste-fan-step)); }
.board[data-stock-side="right"] .waste .card[data-waste-slot="2"] { left: 0; }
.setting-stock-position > small { display: block; margin-top: 3px; font: 500 10px/1.35 Manrope,system-ui,sans-serif; color: #7d7465; }

/* v0.7f.7d: native title tooltips on hover; tap ? for a single floating
   explanation outside the scrolling Settings panel (no layout shifts). */
.appearance-panel .setting-entry {
  display:grid; grid-template-columns:minmax(0,1fr) 26px;
  align-items:start; column-gap:8px; row-gap:0;
  padding:3px 0; min-width:0;
}
.appearance-panel .setting-entry > label {min-width:0; margin:0;}
.appearance-panel .setting-entry .settings-toggle {align-self:center;}
.appearance-panel .setting-entry--select > label {display:grid; gap:5px;}
.appearance-panel .setting-entry--select select {max-width:100%;}
.appearance-panel .setting-entry--select .speed-setting {display:grid; grid-template-columns:1fr; align-items:start;}
.appearance-panel .setting-entry--select .speed-setting select {width:100%;}
.appearance-panel .setting-entry .setting-help,
.appearance-panel .settings-heading--help .setting-help {
  box-shadow:none; display:grid; place-items:center; width:25px; height:25px;
  min-width:25px; padding:0; font:800 13px/1 Manrope,system-ui,sans-serif;
  border-radius:50%; border:1px solid #cfad91; background:#fff5e8; color:#755647;
  cursor:pointer; touch-action:manipulation;
}
.appearance-panel .setting-help:hover {background:#f5e1cb;}
.appearance-panel .setting-help:focus-visible {outline:2px solid #8b5844;outline-offset:2px;}
/* Description text remains in the HTML for assistive technology; it never
   expands the menu, including when a ? has been pressed. */
.appearance-panel .setting-description {display:none!important;}
.appearance-panel .settings-heading--help {
  position:relative; display:flex; align-items:center; justify-content:space-between;
  gap:8px; min-width:0;
}
.settings-floating-tip {
  position:fixed; z-index:10020; box-sizing:border-box; width:max-content;
  max-width:min(260px,calc(100vw - 20px)); padding:9px 11px;
  background:#fff9ee; color:#5e4637; border:1px solid #d4ae8b;
  border-radius:9px; box-shadow:0 3px 10px #3d332b2e;
  font:500 12px/1.45 Manrope,system-ui,sans-serif;
  overflow-wrap:anywhere; pointer-events:none;
}
.settings-floating-tip[hidden] {display:none!important;}
@media (hover:none), (pointer:coarse) {
  .appearance-panel .setting-help {min-width:30px; min-height:30px; width:30px; height:30px;}
  .appearance-panel .setting-entry {grid-template-columns:minmax(0,1fr) 30px;}
}

/* v0.7f.7a: confirmations reuse the existing home-game-preview modal design. */
.action-confirm {inset:0;z-index:10005;}
.action-confirm__card {max-width:420px;max-height:calc(100dvh - 24px);overflow:auto;}
.action-confirm__actions {display:flex;justify-content:center;gap:12px;flex-wrap:wrap;}
.action-confirm__actions button {min-width:114px;min-height:42px;padding:9px 17px;border-radius:30px;font:750 14px/1.2 Manrope,system-ui,sans-serif;cursor:pointer;}
.action-confirm__cancel {background:#fff9ef;color:#36563d;border:1px solid #d4b999;}
.action-confirm__accept {background:#e88578;color:white;border:1px solid #e29b8f;}
.action-confirm__actions button:focus-visible {outline:3px solid #426946;outline-offset:3px;}
@media(max-width:620px){.action-confirm__card{padding:20px 18px}.action-confirm__actions button{min-width:100px;min-height:44px}}


/* v0.7f.7e — ensure hover on the confirmation's primary action never
   inherits the global light button:hover background with white text. */
.action-confirm__actions .action-confirm__accept:hover:not(:disabled),
.action-confirm__actions .action-confirm__accept:focus-visible {
  background: #a8453e;
  border-color: #87372f;
  color: #fff;
}
.action-confirm__actions .action-confirm__cancel:hover:not(:disabled) {
  background: #f2e2cd;
  border-color: #c8aa85;
  color: #36563d;
}

/* v0.7f.7e — two legible non-interactive readouts, still directly after Undo.
   One subtle divider separates game statistics from action buttons. */
.action-dock .dock-readouts {
  align-items: stretch;
  gap: 3px;
  padding: 0 4px 0 clamp(6px, .8vw, 12px);
  border-left: 1px solid #b9a68c;
  font-size: clamp(12px, 1.1vw, 14px);
  line-height: 1.12;
}
.action-dock .dock-readout {
  display: flex;
  align-items: baseline;
  gap: 0;
  line-height: 1.14;
}
.action-dock .dock-readout > span:first-child {
  flex: 0 0 4.3em;
  font: 750 .8em/1.2 Manrope, system-ui, sans-serif;
  letter-spacing: .01em;
  color: #5b715b;
}
.action-dock .dock-readout output {
  font: 800 1em/1.12 Fraunces, Georgia, serif;
  font-variant-numeric: tabular-nums;
  color: #294f3a;
}
.action-dock .dock-readouts__percent-separator {
  margin: 0 .55em;
  opacity: 1;
  color: #a68c6b;
  font-size: .85em;
}
@media (max-width: 620px) {
  .action-dock .dock-readouts {font-size: 11px; padding: 0 2px 0 5px; gap: 2px;}
  .action-dock .dock-readout > span:first-child {font-size: 9.5px; flex-basis: 38px;}
  .action-dock .dock-readouts__percent-separator {margin: 0 .35em;}
}
@media (max-width: 370px) {
  .action-dock .dock-readouts {font-size: 10px; padding-left: 4px;}
  .action-dock .dock-readout > span:first-child {font-size: 9px; flex-basis: 33px;}
}
@media (max-height: 470px) {
  .action-dock .dock-readouts {gap: 0; font-size: clamp(9px, 1.2vw, 11px);}
  .action-dock .dock-readout > span:first-child {font-size: .84em;}
}

/* v0.7f.7h — delicate inset for empty slots, matching card geometry.
   Unlike a deep inset bevel, this is only a fine edge and a very shallow
   inner shadow. The real rose-backed stock and Draw 1/3 waste are unchanged. */
.board .top-row > .pile.stock::before,
.board .top-row > .pile.waste::before,
.board .top-row > .pile.foundation::before {
  box-sizing: border-box;
  top: 0;
  left: 0;
  width: var(--card-w);
  height: var(--card-h);
  border: 1.5px solid rgba(255, 243, 215, .82);
  border-radius: clamp(3px, calc(var(--card-w) / 17), 9px);
  background: rgba(65, 74, 48, .045);
  box-shadow: inset 0 1px 3px rgba(40, 48, 30, .13),
              inset 0 0 0 1px rgba(255, 255, 245, .16);
  pointer-events: none;
}
/* The slot stays anchored under the card: no padding, inset or translation. */
.board .top-row > .pile .pile__cards {top: 0; left: 0;}
.board .foundation .placeholder {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: var(--card-w);
  color: rgba(248, 235, 205, .65);
  font-size: clamp(14px, calc(var(--card-w) * .25), 29px);
  font-weight: 600;
  line-height: 1;
  text-shadow: none;
  opacity: 1;
}
.board .foundation[data-suit="hearts"] .placeholder {
  color: rgba(247, 186, 156, .72);
}
/* Recycle replaces the rose-backed stock only after it is exhausted.
   Keep it INSIDE that same stock slot, never as a separate round button. */
.board .stock .recycle-mark {
  top: 0;
  left: 0;
  width: var(--card-w);
  height: var(--card-h);
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: clamp(19px, calc(var(--card-w) * .27), 30px);
  font-weight: 400;
  color: rgba(240, 204, 173, .8);
  line-height: 1;
  text-shadow: none;
  filter: none;
  pointer-events: none;
}
@media (max-width: 760px) {
  .board .top-row > .pile.stock::before,
  .board .top-row > .pile.waste::before,
  .board .top-row > .pile.foundation::before {
    border-width: 1px;
    box-shadow: inset 0 1px 2px rgba(40, 48, 30, .11),
                inset 0 0 0 1px rgba(255, 255, 245, .12);
  }
}

/* v0.7f.7k — a gentle landing-style halo OUTSIDE the chosen card,
   echoing the existing foundation sparkle without covering card symbols.
   A sibling ring is necessary: the actual card has overflow:hidden.
   The ring animates only opacity and transform on a single tiny element. */
.board .rosy-idle-ring {
  position: absolute;
  box-sizing: border-box;
  display: block;
  z-index: 800;
  pointer-events: none;
  border: 2px solid rgba(255, 228, 178, .94);
  border-radius: clamp(6px, calc(var(--card-w) / 15), 12px);
  background: transparent;
  box-shadow: 0 0 0 1px rgba(222, 137, 108, .55),
              0 0 6px rgba(255, 223, 159, .23);
  transform-origin: center center;
  opacity: 0;
  animation: rosy-idle-halo 2.8s ease-out 1;
}
.board .rosy-idle-ring--first {
  /* Two gentle landing-like waves, starting as soon as the first board appears. */
  animation: rosy-idle-halo 2.4s ease-out 2;
}
@keyframes rosy-idle-halo {
  0% {opacity: 0; transform: scale(.985);}
  16% {opacity: .88; transform: scale(1.012);}
  42% {opacity: .72; transform: scale(1.045);}
  75% {opacity: .24; transform: scale(1.085);}
  100% {opacity: 0; transform: scale(1.11);}
}
.board .rosy-idle-ring--static {
  animation: none !important;
  opacity: .84 !important;
  transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .board .rosy-idle-ring {
    animation: none !important;
    opacity: .84;
    transform: none;
  }
}

/* v0.7f.7l: compact decimal deal-number controls within Settings. */
.deal-code-row input{font-variant-numeric:tabular-nums}
.deal-code-row button{min-width:0;padding-inline:7px}
@media(max-width:390px){.deal-code-row{gap:4px}.deal-code-row input{font-size:11px}.deal-code-row button{padding:7px 5px;font-size:10px}}

/* Stable card nodes: the physical card changes face without replacing HTML.
   During a real-node flight/flip, a temporary back is painted by CSS only. */
.card.back .card__corner,.card.back .card__top-suit,.card.back .card__center,
.card[data-motion-back="true"] .card__corner,
.card[data-motion-back="true"] .card__top-suit,
.card[data-motion-back="true"] .card__center {visibility:hidden!important;}
/* Animate the same rose back that is used in the stock. Never apply
   "dim illegal cards" grayscale/brightness to a card flying face-down. */
.card[data-motion-back="true"] {
  background:linear-gradient(148deg,#fff2df 18%,#fce6ca 120%);
  filter:none!important;
  opacity:1!important;
  transition:none!important;
}
.card[data-motion-back="true"]::after {
  content:'';display:block;position:absolute;inset:4%;border:0;
  border-radius:calc(var(--card-w) / 17);
  background:#e57e6c url('/assets/card-back.svg') no-repeat center/100% 100%;
}
.motion-recycle-card.card {
  border:2px solid #89544a;box-shadow:none!important;
  filter:none!important;box-sizing:border-box;
}
@media(max-width:760px){.motion-recycle-card.card {border-width:1px;}}


/* v0.7f.7p: keep full-sized rank/suit on every waste card. Increase spacing
   for narrow phones, and align the compact exposed corner at x=1px rather than
   scaling its type. The fan is based on VISIBLE cards, not the Draw setting.
   v0.7f.7o: the waste fan depends on the number of VISIBLE cards.
   Without this override, Draw 1 slot 0 inherits the three-card fan's
   -58% offset and appears to fly far past its proper waste placeholder. */
.board[data-stock-side="right"] .waste[data-visible-count="1"] .card[data-waste-slot="0"],
.board[data-stock-side="right"] .waste[data-visible-count="1"] .card[data-waste-top="true"] {
  left:0;
}
.board[data-stock-side="right"] .waste[data-visible-count="2"] .card[data-waste-slot="0"] {
  left:calc(0px - var(--waste-fan-step));
}
.board[data-stock-side="right"] .waste[data-visible-count="2"] .card[data-waste-top="true"] {
  left:0;
}
/* Same type size as all cards; only the start of the covered label moves
   toward the left edge to fit under the next card at narrow widths. */
.board .waste .card.face[data-waste-top="false"] .card__corner { left:1px; }
@media(max-width:620px) {
  .board { --waste-fan-step:calc(var(--card-w) * .46); --waste-fan-double:calc(var(--card-w) * .92); }
}
/* Older exposed Draw 3 cards are unclickable and visually subdued, even
   if the optional general illegal-move shading is disabled. Recolor only
   these two faces rather than applying GPU grayscale filters to moving cards. */
.board .waste .card.face[data-waste-top="false"]:not([data-motion-back="true"]) {
  background:#b9b9b9;
  color:#454545 !important;
  border-color:#898989;
  box-shadow:0 2px 4px #28282838;
  transition:none;
}
/* The moving back always stays the original rose, not the gray waste face. */
.board .waste .card.face[data-motion-back="true"] {
  filter:none !important;
}


/* 0.7.8 — Keep the two covered Draw 3 faces fully rendered, just like the
   active card. Their fan overlap (not visibility:hidden) naturally hides
   covered portions. They remain grey, inert, and excluded from keyboard tabs.
   A moving rose-backed card still uses the dedicated motion-back rules. */
.board .waste .card.face[data-waste-top="false"]:not([data-motion-back="true"]) .card__center,
.board .waste .card.face[data-waste-top="false"]:not([data-motion-back="true"]) .card__top-suit {
  visibility:visible;
}
/* Pips and suit symbols use the inherited grey currentColor. Portraits are
   image files, so desaturate just the portraits, not the card or the board. */
.board .waste .card.face[data-waste-top="false"]:not([data-motion-back="true"]) .card__portrait {
  filter:grayscale(1) brightness(.84);
}


/* RosyGames 0.7.9 — one dock ABOVE cards in portrait,
   RIGHT of cards on desktop or any landscape device. */
.game-layout {
  width:100%;max-width:1260px;margin-inline:auto;flex:1 1 auto;
  min-height:0;min-width:0;display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto minmax(0,1fr);
}
.game-layout > .play-area {
  grid-column:1;grid-row:2;min-width:0;min-height:0;width:100%;
}
.game-layout > .action-dock {
  grid-column:1;grid-row:1;align-self:start;justify-self:center;
  flex:none;width:max-content;max-width:calc(100% - 12px);
  margin:3px auto 4px;
}
@media (orientation:portrait) and (max-width:620px) {
  .game-layout > .action-dock {
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:auto auto;width:calc(100% - 10px);max-width:450px;
    border-radius:18px;padding:5px 6px;gap:4px;min-height:0;margin:2px auto 4px;
  }
  .game-layout .action-dock .dock-button {
    width:100%;min-width:0;min-height:36px;height:36px;
    padding:4px 5px;gap:4px;font-size:clamp(11px,3vw,14px);
  }
  .game-layout .action-dock .dock-button .icon {width:15px;height:15px;}
  .game-layout .action-dock .dock-readouts {
    grid-column:1 / -1;grid-row:2;width:100%;height:auto;min-height:22px;
    display:flex;flex-direction:row;align-items:center;justify-content:space-evenly;
    gap:10px;border-left:0;border-top:1px solid #b9a68c;
    padding:4px 2px 0;font-size:12px;
  }
  .game-layout .action-dock .dock-readout {gap:.25em;}
  .game-layout .action-dock .dock-readout > span:first-child {
    flex-basis:auto;font-size:11px;
  }
  .game-layout .action-dock .dock-readouts__percent-separator {margin:0 .25em;}
}
/* Landscape and mouse-driven desktop, including tall desktop windows. */
@media (orientation:landscape), (pointer:fine) and (min-width:700px) {
  .game-layout {
    grid-template-columns:minmax(0,1fr) clamp(124px,17vw,212px);
    grid-template-rows:minmax(0,1fr);
  }
  .game-layout > .play-area {
    grid-column:1;grid-row:1;
    padding-left:clamp(5px,1.5vw,20px);
    padding-right:clamp(5px,1.1vw,14px);padding-bottom:4px;
  }
  .game-layout > .action-dock {
    grid-column:2;grid-row:1;align-self:start;justify-self:stretch;
    width:auto;max-width:none;min-height:0;
    margin:clamp(5px,2vh,16px) clamp(5px,1vw,12px) 0 0;
    border-radius:24px;padding:10px 8px;
    display:flex;flex-direction:column;align-items:stretch;
    justify-content:flex-start;gap:8px;
  }
  .game-layout .action-dock .dock-button {
    min-width:0;width:100%;height:43px;min-height:37px;
    flex:none;padding:6px 10px;font-size:clamp(12px,1.3vw,17px);
    justify-content:flex-start;gap:8px;
  }
  .game-layout .action-dock .dock-button .icon {width:18px;height:18px;}
  .game-layout .action-dock .dock-readouts {
    width:100%;height:auto;min-height:0;padding:8px 3px 0;
    margin-top:2px;border-left:0;border-top:1px solid #b9a68c;
    gap:5px;font-size:clamp(11px,1.1vw,14px);align-items:stretch;
  }
  .game-layout .action-dock .dock-readout > span:first-child {flex-basis:4.1em;}
}
@media (orientation:landscape) and (max-height:500px) {
  .game-layout {grid-template-columns:minmax(0,1fr) clamp(112px,18vw,148px);}
  .game-layout > .action-dock {border-radius:16px;padding:5px;gap:4px;margin-top:3px;}
  .game-layout .action-dock .dock-button {
    height:34px;min-height:32px;padding:4px 7px;gap:5px;
    font-size:clamp(11px,1.6vw,13px);
  }
  .game-layout .action-dock .dock-button .icon {width:14px;height:14px;}
  .game-layout .action-dock .dock-readouts {
    font-size:11px;padding-top:5px;gap:3px;
  }
  .game-layout .action-dock .dock-readout > span:first-child {flex-basis:3.8em;}
}


/* RosyGames 0.8.0 — adaptive menus and controls.
   Keep the intended placement: touch portrait = ABOVE cards;
   landscape and desktop = RIGHT of cards. Only sizing/layout changes. */
@media (min-width:621px) and (max-width:900px) {
  /* Previous equal 1fr columns wrapped the top-right menu to two lines. */
  .topbar {
    grid-template-columns: auto minmax(0,1fr) auto;
    gap: clamp(3px,.55vw,8px);
    min-height:46px;
    padding: 4px clamp(7px,1vw,11px);
  }
  .topbar__right { flex-wrap:nowrap; justify-self:end; gap:clamp(3px,.45vw,6px); }
  .game-navigation { min-width:0; justify-self:center; }
  .brand.brand--wordmark { min-width:0; padding-inline:5px; }
  .brand.brand--wordmark .brand__logo { width:clamp(102px,15vw,125px); }
  .draw-setting {padding:3px 5px;gap:3px;}
  .circle-button {flex:none;}
}
/* Portrait phones: a comfortable row of 3 actions, with statistics below.
   The two-row layout remains compact enough not to steal card height. */
@media (orientation:portrait) and (pointer:coarse) and (max-width:620px) {
  .game-layout > .action-dock {
    width:calc(100% - 12px);max-width:570px;
    padding:6px 7px 5px;gap:4px;
    margin:3px auto 5px;border-radius:18px;
  }
  .game-layout .action-dock .dock-button {
    height:clamp(38px,9.2vw,44px);min-height:38px;
    font-size:clamp(12px,2.9vw,15px);gap:clamp(3px,.8vw,8px);
    padding:5px 4px;
  }
  .game-layout .action-dock .dock-button .icon {width:clamp(14px,3.7vw,18px);height:clamp(14px,3.7vw,18px);}
  .game-layout .action-dock .dock-readouts {
    min-height:24px;padding-top:4px;gap:6px;font-size:clamp(11px,2.65vw,13px);
  }
  .game-layout .action-dock .dock-readout > span:first-child {font-size:clamp(10px,2.4vw,12px);}
}
/* Tablet portrait: avoid miniature, 33px-wide-action-look controls.
   Spread a single horizontal dock across the available width. */
@media (orientation:portrait) and (pointer:coarse) and (min-width:621px) {
  .game-layout > .action-dock {
    width:min(730px,calc(100% - 20px));max-width:calc(100% - 20px);
    padding:7px 9px;gap:clamp(6px,1vw,12px);min-height:56px;
    margin:4px auto 7px;border-radius:30px;
  }
  .game-layout .action-dock .dock-button {
    flex:1 1 0;min-width:0;width:auto;
    height:42px;min-height:42px;padding:7px 8px;
    gap:clamp(5px,1vw,9px);font-size:clamp(13px,1.8vw,17px);
  }
  .game-layout .action-dock .dock-button .icon {width:18px;height:18px;}
  .game-layout .action-dock .dock-readouts {
    flex:none;width:clamp(102px,15vw,142px);
    height:42px;min-height:42px;padding:1px 0 1px 9px;
    gap:3px;border-top:0;border-left:1px solid #b9a68c;
    font-size:clamp(12px,1.6vw,14px);align-items:stretch;
  }
  .game-layout .action-dock .dock-readout > span:first-child {
    flex:0 0 3.8em;font-size:.8em;
  }
}
/* Landscape and desktop: make each command a proper button,
   not an overcompressed footer strip. */
@media (orientation:landscape), (pointer:fine) and (min-width:700px) {
  .game-layout {
    grid-template-columns:minmax(0,1fr) clamp(136px,17vw,216px);
  }
  .game-layout > .action-dock {
    padding:clamp(6px,1vw,11px) clamp(6px,.7vw,9px);
    gap:clamp(5px,.65vw,9px);border-radius:22px;
  }
  .game-layout .action-dock .dock-button {
    height:clamp(40px,3.4vw,46px);min-height:40px;
    font-size:clamp(13px,1.28vw,17px);gap:7px;padding:6px 9px;
  }
  .game-layout .action-dock .dock-readouts {
    padding-top:8px;font-size:clamp(12px,1.1vw,14px);gap:5px;
  }
}
/* Small landscape handsets: reclaim width and height for cards, while
   preserving 36px action targets and legible statistics. */
@media (orientation:landscape) and (max-width:900px) and (max-height:520px) {
  .topbar {min-height:38px;}
  .game-layout {grid-template-columns:minmax(0,1fr) clamp(114px,18vw,148px);}
  .game-layout > .action-dock {
    padding:5px;gap:4px;border-radius:16px;
    margin:3px 5px 0 0;
  }
  .game-layout .action-dock .dock-button {
    height:36px;min-height:36px;padding:4px 6px;gap:5px;
    font-size:clamp(11px,1.7vw,13px);
  }
  .game-layout .action-dock .dock-button .icon {width:14px;height:14px;}
  .game-layout .action-dock .dock-readouts {
    font-size:11px;gap:3px;padding:6px 2px 0;margin-top:0;
  }
  .game-layout .action-dock .dock-readout > span:first-child {flex-basis:3.7em;font-size:.82em;}
}
/* Landscape navigation: a single header row even at 667px widths.
   Panel overlays remain scrollable on short devices. */
@media (orientation:landscape) and (max-height:520px) {
  .topbar {padding-top:2px;padding-bottom:2px;}
  .topbar__right {flex-wrap:nowrap;}
  .appearance-panel {max-height:min(76dvh,calc(100dvh - 52px));overscroll-behavior:contain;}
  .game-menu__panel {max-height:calc(100dvh - 54px);overflow-y:auto;}
}
/* Keyboard, mouse and touch can all find the new dock quickly. */
.game-layout .action-dock .dock-button:focus-visible {
  outline:3px solid #416c48;outline-offset:2px;
}


/* 0.8.1 — Keep attention on the cards. Counters move into victory results.
   Controls retain the approved above/right placement from 0.8.0. */
.game-layout > .action-dock .dock-button--undo {
  background:linear-gradient(150deg,#f5e3ce,#f6d1ba);
  border:2px solid #c9826b;color:#754a3c;
  box-shadow:0 2px 6px #8d5d3f3b, inset 0 1px 1px #fff5e7;
  font-weight:850;
}
.game-layout > .action-dock .dock-button--undo:hover:not(:disabled) {
  background:#f4c3a8;border-color:#a85e4e;color:#55342b;
}
.game-layout > .action-dock .dock-button--undo:disabled {opacity:.53;}
@media (orientation:portrait) and (max-width:620px) {
  .game-layout > .action-dock {
    display:grid;grid-template-columns:1fr 1fr 1.18fr;grid-template-rows:auto;
    align-items:center;width:calc(100% - 12px);max-width:570px;
    padding:5px 6px;margin:3px auto 5px;
  }
  .game-layout .action-dock .dock-button {font-size:clamp(11px,2.9vw,15px);}
}
@media (orientation:portrait) and (pointer:coarse) and (min-width:621px) {
  .game-layout > .action-dock {width:min(610px,calc(100% - 20px));justify-content:center;}
  .game-layout .action-dock .dock-button {flex:1 1 0;}
}
@media (orientation:landscape), (pointer:fine) and (min-width:700px) {
  .game-layout > .action-dock {align-items:stretch;}
  .game-layout .action-dock .dock-button--undo {min-height:45px;}
}
/* Celebration and voluntary statistics dialogs: readable even on 320px phones. */
.win__panel,.statistics-dialog__panel {
  width:min(390px,calc(100vw - 28px));
  max-height:calc(100dvh - 28px);overflow:auto;
  padding:clamp(18px,4vw,30px);border-radius:22px;
  background:#fff3e4;border:1px solid #ecd3b0;color:#36563d;
  text-align:center;box-shadow:0 18px 55px #2b261d62;
}
.win__panel h2,.statistics-dialog__panel h2 {
  font:750 clamp(23px,5.5vw,30px)/1.2 Fraunces,Georgia,serif;
  margin:8px 0 5px;
}
.victory-flowers {color:#c87872;letter-spacing:.1em;font-size:22px;}
.win__panel .victory-subtitle,.statistics-dialog__panel p {
  margin:3px 0 15px;font:550 12px/1.45 Manrope,system-ui,sans-serif;color:#6e7659;
}
.victory-stats {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 19px;}
.victory-stat {
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:11px 6px;min-width:0;min-height:74px;
  border:1px solid #ebd8bd;border-radius:14px;background:#fffaf3;
}
.victory-stat span {font:750 11px/1.4 Manrope,system-ui,sans-serif;color:#75826c;}
.victory-stat output {font:750 clamp(23px,6vw,29px)/1.3 Fraunces,Georgia,serif;color:#3d6245;font-variant-numeric:tabular-nums;}
.win__panel .victory-stats--compact {display:flex;flex-direction:column;gap:9px;margin:12px 0 18px;}
.win__panel .victory-stat--moves {
  min-height:auto;padding:10px 10px 12px;border-radius:16px;
  background:linear-gradient(180deg,#fffaf4 0%,#fff4e7 100%);
}
.win__panel .victory-stat--moves span {
  font-size:12px;letter-spacing:.08em;text-transform:uppercase;
}
.win__panel .victory-stat--moves output {
  font-size:clamp(34px,10vw,46px);line-height:1.05;color:#33563f;
}
.victory-summary-row {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}
.win__panel .victory-stat--summary {min-height:58px;padding:8px 4px;border-radius:12px;}
.win__panel .victory-stat--summary span {font-size:10px;line-height:1.3;}
.win__panel .victory-stat--summary output {font-size:clamp(18px,5vw,23px);line-height:1.15;}
.win__panel .victory-new,.statistics-dialog__panel > button {
  min-height:45px;border-radius:50px;padding:10px 26px;
  background:#e98679;color:white;border:1px solid #d78171;
  font:800 15px/1.2 Manrope,system-ui,sans-serif;
  cursor:pointer;box-shadow:0 3px 8px #c7836f45;
}
.win__panel .victory-new:hover,.statistics-dialog__panel > button:hover {background:#b95d53;color:white;}
.win__panel button:focus-visible,.statistics-dialog button:focus-visible,.view-statistics:focus-visible {outline:3px solid #476e46;outline-offset:3px;}
.statistics-dialog[hidden]{display:none!important;}
.statistics-dialog {position:fixed;z-index:10015;inset:0;display:grid;place-items:center;padding:14px;background:#3d303d8d;}
.statistics-dialog .victory-stats--summary {grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
.statistics-dialog .victory-stats--summary .victory-stat {padding:10px 3px;}
.statistics-dialog .victory-stats--summary .victory-stat span {font-size:10px;}
.view-statistics {width:100%;min-height:37px;padding:8px 10px;border:1px solid #cfa788;border-radius:12px;background:#fff8ec;color:#416647;font:800 12px/1.4 Manrope,system-ui,sans-serif;cursor:pointer;}
.view-statistics:hover {background:#f4e1cb;}
@media(max-height:440px) {
  .win__panel .victory-stats--compact {margin:8px 0 10px;gap:6px;}
  .win__panel .victory-stat--moves {padding:7px 8px 9px;}
  .win__panel .victory-stat--moves output {font-size:clamp(30px,9vw,38px);}
  .win__panel .victory-stat--summary {min-height:49px;padding:6px 3px;}
  .win__panel .victory-stat--summary span {font-size:9px;}
  .win__panel .victory-stat--summary output {font-size:clamp(16px,4.5vw,20px);}
  .victory-stats {margin:8px 0 10px;gap:6px;}
  .victory-stat {min-height:55px;padding:5px;}
  .win__panel,.statistics-dialog__panel {padding:12px 20px;max-height:calc(100dvh - 12px);}
}

/* RosyGames 0.8.4 — mobile landscape ergonomics. The topbar's fixed right
   controls (especially Settings) must not shift when the title is padded. */
@media (orientation: landscape) and (max-width: 1024px) and (max-height: 600px) {
  .topbar {
    display:grid; grid-template-columns:auto minmax(0,1fr) max-content;
    align-items:center; gap:clamp(3px,.55vw,7px);
    padding:2px clamp(5px,1vw,8px); min-height:42px;
  }
  .topbar .game-navigation {min-width:0;max-width:100%;justify-self:center;gap:clamp(2px,.45vw,5px);}
  .topbar__right {display:flex;flex-wrap:nowrap;justify-self:end;align-self:center;
    align-items:center;gap:clamp(3px,.55vw,6px);min-width:max-content;}
  .topbar .circle-button {flex:0 0 34px;width:34px;height:34px;min-width:34px;
    min-height:34px;padding:7px;align-self:center;}
  .topbar #appearance-toggle {margin:0;position:relative;transform:none;}
  .topbar .draw-setting {flex:0 0 auto;}
}
/* Undo first in every landscape side dock (phones, tablets, desktop),
   while the portrait horizontal button order remains unchanged. */
@media (orientation:landscape) {
  .game-layout > .action-dock #undo {order:-1;}
}
/* Orientation prompt appears only via JS on mobile phones. It does not consume
   any space when hidden or on desktop. */
.landscape-fullscreen-prompt[hidden] {display:none!important;}
.landscape-fullscreen-prompt {
  position:fixed;inset:0;z-index:18000;display:grid;place-items:center;
  padding:12px;background:#2734269e;backdrop-filter:blur(3px);
}
.landscape-fullscreen-prompt__card {
  width:min(370px,calc(100vw - 30px));max-height:calc(100dvh - 24px);
  overflow-y:auto;background:#fff3e4;border:1px solid #f1dbc4;
  border-radius:18px;padding:clamp(13px,3vh,19px);
  text-align:center;box-shadow:0 14px 38px #1f211d75;color:#35553c;
}
.landscape-fullscreen-prompt__card h2 {
  margin:0 0 5px;font:750 clamp(17px,4.4vh,22px)/1.14 Fraunces,Georgia,serif;
}
.landscape-fullscreen-prompt__card p {
  margin:0 0 12px;font:600 12px/1.4 Manrope,system-ui,sans-serif;
  color:#6d715f;
}
.landscape-fullscreen-prompt__buttons {display:flex;justify-content:center;gap:9px;}
.landscape-fullscreen-prompt__buttons button {
  min-height:39px;border-radius:24px;padding:8px 16px;
  font:750 13px/1.2 Manrope,system-ui,sans-serif;cursor:pointer;
}
.landscape-fullscreen-prompt__enter {
  color:white;background:#db796e;border:1px solid #c36d62;
}
.landscape-fullscreen-prompt__later {
  color:#4b614a;background:#fffaf0;border:1px solid #d8bea6;
}
.landscape-fullscreen-prompt__buttons button:focus-visible {outline:3px solid #446b48;outline-offset:2px;}

/* RosyGames 0.8.5 — real interactive floral header, inspired by the approved
   desktop concept. No gameplay, element order or navigation logic is changed. */
.topbar {
  isolation:isolate;
  background:
    linear-gradient(180deg,rgba(255,250,237,.98),rgba(255,237,213,.97) 66%,rgba(249,217,188,.97));
  border-bottom:2px solid #d9aa87;
  box-shadow:inset 0 1px 0 #fffef3, inset 0 -1px 0 #ffead4,0 3px 9px #423b2850;
}
.topbar .brand.brand--wordmark {
  border:1px solid #d8ae84;border-radius:45px;
  background:linear-gradient(175deg,#fff9ec,#fff0da);
  box-shadow:0 2px 4px #634a3e5c,inset 0 0 0 2px #fff8e6;
}
.topbar .brand.brand--wordmark .brand__logo {width:clamp(144px,11vw,186px);max-height:49px;}
.topbar .game-navigation {gap:clamp(10px,1.5vw,26px);}
.topbar .game-navigation .title-ribbon {
  isolation:isolate;position:relative;z-index:1;
  min-height:52px;padding:8px clamp(16px,1.65vw,27px);
  border:2px solid #b9845e;border-radius:25px 25px 29px 29px/21px 21px 25px 25px;
  outline:1px solid #fdf4dd;outline-offset:-5px;
  background:radial-gradient(ellipse at 50% -10%,#fffdf0 3%,#fff5df 55%,#ffead3);
  color:#315c3c;
  box-shadow:0 3px 5px #64433145, inset 0 0 0 1px #dca77f;
  font-size:clamp(22px,1.85vw,31px);font-weight:770;letter-spacing:-.025em;
}
.topbar .game-navigation .title-ribbon::before,
.topbar .game-navigation .title-ribbon::after {
  top:25%;bottom:26%;width:23px;z-index:-1;
  border:1px solid #c5946c;
  background:linear-gradient(180deg,#fff6e7,#ffe8d0);
  box-shadow:0 2px 2px #6e4d302d;
}
.topbar .game-navigation .title-ribbon .icon {
  color:#65855b;width:25px;height:34px;
}
.topbar .game-navigation .title-ribbon__rose {
  position:absolute;z-index:2;display:block;width:38px;height:38px;
  top:-13px;filter:drop-shadow(0 1px 1px #7c5a4250);pointer-events:none;
}
.topbar .title-ribbon__rose--left {left:-24px;transform:rotate(-18deg);}
.topbar .title-ribbon__rose--right {right:-24px;transform:rotate(16deg);}
.topbar .game-menu__toggle {
  min-height:39px;padding:7px clamp(12px,1.3vw,19px);
  border:1px solid #b98867;border-radius:25px;
  background:linear-gradient(170deg,#fff9eb,#ffeccf);
  box-shadow:0 2px 5px #6843314c,inset 0 0 0 2px #fff7e8;
  font:760 clamp(12px,.95vw,16px)/1 Fraunces,Georgia,serif;
  color:#375741;
}
.topbar .game-menu__label::before {
  content:'❧';font:900 18px/0 Georgia,serif;color:#6c8b59;
  margin-right:8px;vertical-align:-.09em;
}
.topbar .game-menu__toggle:hover,
.topbar .game-menu__toggle[aria-expanded="true"] {
  background:linear-gradient(170deg,#fffdf2,#f4e0bc);
  border-color:#ae7650;
}
.topbar .draw-setting,
.topbar .circle-button {
  border:1px solid #d6ab82;
  background:linear-gradient(168deg,#fff9ec,#ffefd6);
  box-shadow:0 2px 5px #694e3e52,inset 0 1px 0 #fffcf3;
}
.topbar .circle-button {width:41px;height:41px;}
.topbar .title-ribbon__full {text-shadow:0 1px 0 #ffffffaa;}
@media(min-width:1200px){
  .topbar {min-height:72px;padding:4px clamp(12px,1vw,24px);}
  .topbar .brand.brand--wordmark {min-height:48px;}
  .topbar .game-navigation {gap:clamp(16px,1.7vw,29px);}
}
@media(min-width:901px) and (max-width:1199px){
  .topbar {min-height:60px;gap:clamp(3px,.6vw,9px);padding:3px 9px;}
  .topbar .brand.brand--wordmark .brand__logo {width:clamp(120px,13vw,150px);}
  .topbar .game-navigation {gap:clamp(6px,.75vw,12px);}
  .topbar .game-navigation .title-ribbon {font-size:clamp(17px,1.95vw,24px);min-height:44px;padding:6px 12px;}
  .topbar .game-navigation .title-ribbon__rose {width:27px;height:27px;top:-9px;}
  .topbar .title-ribbon__rose--left {left:-15px;}
  .topbar .title-ribbon__rose--right {right:-15px;}
  .topbar .game-menu__toggle {min-height:34px;padding:7px 10px;font-size:12px;}
  .topbar .game-menu__label::before {font-size:14px;margin-right:5px;}
  .topbar .circle-button {width:36px;height:36px;padding:7px;}
}
/* On tablets and phones preserve the proven 0.8.4 header geometry. */
@media(max-width:900px){
  .topbar {background:linear-gradient(180deg,#fff8e9e6,#f6e3cde5);border-bottom-width:1px;}
  .topbar .brand.brand--wordmark .brand__logo {width:clamp(102px,15vw,125px);max-height:34px;}
  .topbar .game-navigation {gap:3px;}
  .topbar .game-navigation .title-ribbon {
    min-height:0;padding:4px 8px;font-size:clamp(14px,2vw,19px);
    border-width:1px;border-radius:30px;outline:none;
  }
  .topbar .game-navigation .title-ribbon .icon {width:16px;height:25px;}
  .topbar .game-navigation .title-ribbon__rose {display:none;}
  .topbar .game-menu__toggle {min-height:29px;padding:5px 6px;font-size:11px;}
  .topbar .game-menu__label::before {display:none;}
  .topbar .circle-button {width:34px;height:34px;}
}
@media(max-width:700px){
  .topbar .game-menu__toggle {width:29px;height:30px;padding:0;}
}
@media(max-width:620px){
  .topbar {background:linear-gradient(180deg,#fff8e9dd,#f6e7d7dc);}
  .topbar .game-navigation {gap:2px;}
  .topbar .game-navigation .title-ribbon {font-size:clamp(12px,3.5vw,15px);padding:3px 6px;gap:3px;}
  .topbar .game-navigation .title-ribbon .icon {display:none;}
  .topbar .game-menu__toggle {width:27px;height:28px;padding:0;}
  .topbar .circle-button {width:34px;height:34px;}
}
@media(max-width:390px){
  .topbar .game-navigation {gap:1px;}
  .topbar .game-navigation .title-ribbon {font-size:clamp(12px,3.65vw,14px);padding:3px 5px;}
  .topbar .game-menu__toggle {width:23px;height:26px;min-height:26px;}
  .topbar .circle-button {width:26px;height:26px;}
}
@media(max-width:335px){
  .topbar .game-navigation .title-ribbon {font-size:12px;padding:2px 3px;}
  .topbar .game-menu__toggle {width:21px;height:25px;}
}
@media(orientation:landscape) and (max-height:520px){
  /* Keep the 0.8.4 mobile landscape controls aligned and the cards visible. */
  .topbar .game-navigation {gap:clamp(2px,.45vw,5px);}
  .topbar .game-navigation .title-ribbon {min-height:0;}
  .topbar .circle-button {width:34px;height:34px;}
}

@media(min-width:901px){
  .topbar .game-navigation .title-ribbon {
    border:0;outline:none;border-radius:0;
    background:url('/assets/header-title-frame.svg') no-repeat center / 100% 100%;
    box-shadow:none;filter:drop-shadow(0 2px 2px #67473748);
  }
  .topbar .game-navigation .title-ribbon::before,
  .topbar .game-navigation .title-ribbon::after {display:none;}
}
/* 0.8.6: on wide-but-low screens, keep the title compact and hide decorative
   side inserts behind the neighboring menu buttons instead of exposing extra
   ornamental pieces around the text. Also lock the right controls so the gear
   button never drifts vertically or horizontally. */
@media (orientation:landscape) and (max-width:900px) and (max-height:430px) {
  .topbar {
    grid-template-columns:auto minmax(0,1fr) max-content;
    gap:clamp(2px,.4vw,4px);
    padding:2px 4px;
    min-height:38px;
  }
  .topbar .brand.brand--wordmark .brand__logo {width:96px;max-height:30px;}
  .topbar .game-navigation {
    gap:0;
    min-width:0;
    align-items:center;
  }
  .topbar .game-menu {position:relative; z-index:3;}
  .topbar .game-menu--similar {margin-right:-3px;}
  .topbar .game-menu--more {margin-left:-3px;}
  .topbar .game-navigation .title-ribbon {
    font-size:clamp(12px,2.8vw,15px);
    padding:3px 7px;
    gap:0;
    min-height:28px;
    box-shadow:none;
  }
  .topbar .game-navigation .title-ribbon .icon,
  .topbar .game-navigation .title-ribbon__rose {display:none !important;}
  .topbar .game-menu__toggle {
    width:27px;
    min-width:27px;
    height:28px;
    min-height:28px;
    padding:0;
  }
  .topbar__right {
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:max-content;
    align-items:center;
    justify-self:end;
    align-self:center;
    gap:4px;
    min-width:max-content;
  }
  .topbar .draw-setting {
    display:flex;
    align-items:center;
    height:34px;
    min-height:34px;
    margin:0;
    padding:1px 6px;
    align-self:center;
  }
  .topbar .draw-setting select {
    height:28px;
    margin:0;
  }
  .topbar .circle-button {
    width:34px;
    height:34px;
    min-width:34px;
    min-height:34px;
    margin:0;
    padding:7px;
    align-self:center;
    justify-self:center;
  }
  .topbar #appearance-toggle,
  .topbar #sound-toggle {position:static; transform:none; inset:auto;}
}

/* 0.8.7: final topbar polish for edge cases.
   - On portrait phones/tablets the title pill has no side insert tabs.
   - On wide + low-height screens, the settings gear stays aligned with draw and sound. */
@media (orientation:landscape) and (min-width:901px) and (max-height:430px) {
  .topbar {
    display:grid;
    grid-template-columns:auto minmax(0,1fr) max-content;
    align-items:center;
    gap:clamp(4px,.55vw,8px);
    min-height:52px;
    padding:3px 8px;
  }
  .topbar .brand.brand--wordmark {align-self:center;}
  .topbar .game-navigation {
    min-width:0;
    justify-self:center;
    align-items:center;
    gap:clamp(8px,.8vw,14px);
  }
  .topbar__right {
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    justify-self:end;
    align-self:center;
    gap:6px;
    min-width:max-content;
    margin:0;
  }
  .topbar .draw-setting {
    display:flex;
    align-items:center;
    align-self:center;
    min-height:38px;
    height:38px;
    margin:0;
    padding:2px 8px;
  }
  .topbar .draw-setting select {
    height:30px;
    margin:0;
  }
  .topbar .circle-button {
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    min-width:38px;
    min-height:38px;
    margin:0;
    padding:7px;
    align-self:center;
    position:static;
    transform:none;
  }
  .topbar #appearance-toggle,
  .topbar #sound-toggle {position:static;transform:none;inset:auto;margin:0;}
}

/* Menu buttons overlay decorative title side tabs and rose flourishes at ALL widths;
   the title face stays above its own ::before/::after tabs. */
.topbar .game-navigation {isolation:isolate;}
.topbar .game-navigation .game-menu {position:relative;z-index:4;}
/* 0.8.8 — restore the decorative title tabs (not delete them).
   The title pill is above its ::before/::after tabs, while neighboring game
   buttons paint ABOVE the tabs. This gives the tucked-under look requested. */
@media(max-width:900px) {
  .topbar .game-navigation {isolation:isolate;}
  .topbar .game-navigation .title-ribbon {position:relative;z-index:1;isolation:isolate;}
  .topbar .game-navigation .title-ribbon::before,
  .topbar .game-navigation .title-ribbon::after {
    display:block;z-index:-1;pointer-events:none;
  }
  .topbar .game-navigation .game-menu {position:relative;z-index:3;}
}
@media(max-width:620px) {
  .topbar .game-navigation {gap:0;}
  .topbar .game-navigation .game-menu--similar {margin-right:-2px;}
  .topbar .game-navigation .game-menu--more {margin-left:-2px;}
  .topbar {min-height:36px;padding-top:1px;padding-bottom:1px;}
}
/* The old decorative header was ~72px on desktop. Reclaim vertical space
   without removing its floral art, title frame or accessible controls. */
@media(min-width:1200px) {
  .topbar {min-height:56px;padding-top:2px;padding-bottom:2px;}
  .topbar .brand.brand--wordmark {min-height:40px;padding:1px 8px;}
  .topbar .brand.brand--wordmark .brand__logo {width:clamp(126px,9vw,154px);max-height:38px;}
  .topbar .game-navigation .title-ribbon {min-height:42px;padding:4px 15px;font-size:clamp(21px,1.52vw,26px);}
  .topbar .game-navigation .title-ribbon__rose {width:29px;height:29px;top:-7px;}
  .topbar .title-ribbon__rose--left {left:-16px;}
  .topbar .title-ribbon__rose--right {right:-16px;}
  .topbar .game-menu__toggle {min-height:34px;padding:6px 12px;}
  .topbar .circle-button {width:36px;height:36px;min-height:36px;padding:7px;}
}
@media(min-width:901px) and (max-width:1199px) {
  .topbar {min-height:50px;padding:2px 8px;}
  .topbar .brand.brand--wordmark {min-height:37px;padding-top:1px;padding-bottom:1px;}
  .topbar .brand.brand--wordmark .brand__logo {width:clamp(112px,12vw,136px);max-height:35px;}
  .topbar .game-navigation .title-ribbon {min-height:38px;padding:3px 10px;font-size:clamp(17px,1.7vw,21px);}
  .topbar .game-navigation .title-ribbon__rose {width:23px;height:23px;top:-6px;}
  .topbar .title-ribbon__rose--left {left:-12px;}
  .topbar .title-ribbon__rose--right {right:-12px;}
  .topbar .game-menu__toggle {min-height:31px;padding:6px 8px;}
  .topbar .circle-button {width:34px;height:34px;min-height:34px;padding:7px;}
}
@media(min-width:621px) and (max-width:900px) {
  .topbar {min-height:43px;padding-top:2px;padding-bottom:2px;}
  .topbar .brand.brand--wordmark {min-height:33px;padding-top:1px;padding-bottom:1px;}
  .topbar .brand.brand--wordmark .brand__logo {max-height:31px;}
  .topbar .game-navigation .title-ribbon {min-height:30px;padding-top:3px;padding-bottom:3px;}
  .topbar .circle-button {width:32px;height:32px;min-height:32px;min-width:32px;}
}
/* Keep all three right-hand controls exactly on the same baseline on short
   landscape screens (including wide laptops and mobile landscape). */
@media(orientation:landscape) and (max-height:430px) {
  .topbar {min-height:38px;padding-top:1px;padding-bottom:1px;align-items:center;}
  .topbar .brand.brand--wordmark {min-height:32px;padding-top:0;padding-bottom:0;align-self:center;}
  .topbar .brand.brand--wordmark .brand__logo {max-height:30px;}
  .topbar__right {
    display:flex;align-items:center;justify-content:flex-end;
    justify-self:end;align-self:center;flex-wrap:nowrap;
    gap:4px;min-width:max-content;margin:0;padding:0;
  }
  .topbar .draw-setting {
    flex:0 0 auto;display:flex;align-items:center;align-self:center;
    height:32px;min-height:32px;padding:1px 5px;margin:0;
  }
  .topbar .draw-setting select {height:auto;margin:0;}
  .topbar .circle-button {
    position:static;display:grid;place-items:center;
    flex:0 0 32px;width:32px;height:32px;min-width:32px;min-height:32px;
    align-self:center;justify-self:auto;margin:0;padding:6px;transform:none;
  }
  .topbar #appearance-toggle,.topbar #sound-toggle {
    position:static;inset:auto;transform:none;margin:0;align-self:center;
  }
}

/* 0.8.10: keep the decorative ribbon tabs but push their exposed ends
   further beneath the opaque title face and adjacent menu buttons. */
@media (max-width:900px) {
  .topbar .game-navigation .title-ribbon {z-index:2;isolation:isolate;}
  .topbar .game-navigation .title-ribbon::before {left:-4px;z-index:-2;}
  .topbar .game-navigation .title-ribbon::after {right:-4px;z-index:-2;}
  .topbar .game-navigation .game-menu {z-index:4;}
}

/* RosyGames 0.8.11 — simplify title pill and make logo a home link. */
.topbar a.brand.brand--wordmark { text-decoration:none; color:inherit; }
.topbar a.brand.brand--wordmark:focus-visible { outline:3px solid #476e46; outline-offset:2px; }
.topbar .game-navigation .title-ribbon .icon,
.topbar .game-navigation .title-ribbon__rose,
.topbar .game-navigation .title-ribbon .mobile-brand-mark { display:none !important; }
.topbar .game-navigation .title-ribbon { gap:0; }
@media (max-width:900px) {
  .topbar .game-navigation .title-ribbon::before,
  .topbar .game-navigation .title-ribbon::after { display:none !important; }
  .topbar .game-navigation .title-ribbon { padding-inline:8px; }
}

/* RosyGames 0.8.12 — give the game name more breathing room. Keep the
   smallest phone view compact so navigation and settings still fit. */
@media (min-width:621px) {
  .topbar .game-navigation .title-ribbon {padding:3px 30px;}
}


/* RosyGames 0.9.22 — desktop botanical header. Each mirrored rose is drawn
   BEHIND the solid title ribbon as a sibling in the navigation stacking context.
   Decorative foliage remains behind all interactive controls. */
@media (min-width: 1200px) and (min-height: 521px) {
  .topbar {
    position:relative;
    isolation:isolate;
    min-height:56px;
    padding-block:2px;
    background:linear-gradient(180deg,#fffaf1 0%,#fff2e3 74%,#f9e4d4 100%);
    border-bottom:1px solid #cb9d78;
    box-shadow:inset 0 1px #fffcf5,0 2px 5px #45312238;
  }
  .topbar::before,
  .topbar::after {
    content:"";
    position:absolute;
    z-index:0;
    top:50%;
    width:clamp(94px,10vw,154px);
    height:36px;
    background:url('/assets/header/leaf-sprig.webp') no-repeat center / contain;
    opacity:.82;
    pointer-events:none;
  }
  /* Tuck the little leaf sprays closer to the center, not to the logo/gear. */
  .topbar::before {
    left:calc(50% - clamp(320px,26vw,420px));
    transform:translateY(-50%);
  }
  .topbar::after {
    right:calc(50% - clamp(320px,26vw,420px));
    transform:translateY(-50%) scaleX(-1);
  }
  .topbar .brand.brand--wordmark,
  .topbar .topbar__right {position:relative;z-index:2;}
  .topbar .game-navigation {
    position:relative;z-index:3;isolation:isolate;
    gap:clamp(25px,2.7vw,44px);
  }
  /* Navigation-level pseudo-elements keep the flowers underneath the opaque
     title. Negative child z-index on .title-ribbon cannot reliably do that. */
  .topbar .game-navigation::before,
  .topbar .game-navigation::after {
    content:"";
    position:absolute;
    z-index:0;
    top:50%;
    width:clamp(116px,10vw,154px);
    height:47px;
    background:url('/assets/header/rose-sprig.webp') no-repeat center / contain;
    opacity:.96;
    pointer-events:none;
  }
  /* The supplied rose image stops halfway through the flower at its outer
     edge. Both CUT EDGES must finish *behind* the opaque title plaque, not
     between the plaque and its menu button. Keep them below the title layer. */
  .topbar .game-navigation::before {
    left:calc(50% - clamp(207px,15vw,245px));
    transform:translateY(-50%);
  }
  .topbar .game-navigation::after {
    right:calc(50% - clamp(174px,12.5vw,205px));
    transform:translateY(-50%) scaleX(-1);
  }
  .topbar .game-navigation .game-menu {position:relative;z-index:4;}
  .topbar .game-navigation .title-ribbon {
    position:relative;
    z-index:2;
    min-height:42px;
    padding:3px clamp(26px,2.35vw,39px);
    font-size:clamp(20px,1.63vw,26px);
    filter:none;
    background:url('/assets/header-title-frame.svg') no-repeat center / 100% 100%;
  }
  .topbar .game-navigation .title-ribbon::before,
  .topbar .game-navigation .title-ribbon::after {
    content:none !important;
    display:none !important;
  }
}
/* On mobile and landscape with little vertical space, the topbar remains
   exactly as compact as before; decorations cannot cover the menu buttons. */
@media (max-width:1199px), (max-height:520px) {
  .topbar::before,.topbar::after {content:none !important;}
  .topbar .game-navigation .title-ribbon::before,
  .topbar .game-navigation .title-ribbon::after {content:none !important;display:none !important;}
}

/* RosyGames 0.9.22 — steady, clean control shadows during card animation.
   A backdrop blur continually samples moving card pixels and may repaint
   the stationary controls. Opaque cream and static shadows avoid that cost. */
.rg-game-controls {
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  background:#fff2e5;
  isolation:isolate;
}
.rg-game-panel .rg-panel-button {
  filter:none;
  backface-visibility:hidden;
  box-shadow:0 2px 4px #795a4233,inset 0 1px 0 #fff9f0;
}
.rg-game-panel .rg-panel-button--undo {
  box-shadow:0 2px 4px #8d5d3f33,inset 0 1px 1px #fff5e7;
}
.rg-game-panel .rg-panel-button:hover:not(:disabled) {
  filter:none;
}
/* Touch portrait: a more coherent single-line navigation bar. Keep full
   names and the real Similar/More/Draw/Sound/Settings controls accessible. */
@media (max-width:620px) and (orientation:portrait) {
  .topbar {
    grid-template-columns:minmax(0,1fr) max-content;
    min-height:40px;
    gap:2px;
    padding:3px 5px 4px;
    border-bottom:1px solid #d1ae8b;
    background:linear-gradient(180deg,#fff9ecee,#f5e4d6f2);
    box-shadow:0 2px 3px #69473725;
  }
  .topbar .game-navigation {gap:1px;min-width:0;justify-self:start;}
  .topbar .game-menu__toggle {
    min-width:26px;width:26px;height:28px;min-height:28px;
    padding:0;border-color:#d9b994;
    box-shadow:0 1px 2px #6a4c3730;
  }
  .topbar .game-navigation .title-ribbon {
    min-height:27px;
    padding:3px 7px;
    border:1px solid #d2aa85;
    border-radius:20px;
    background:linear-gradient(180deg,#fffaf0,#ffeddb);
    box-shadow:0 1px 2px #73513c32;
    font-size:clamp(12px,3.45vw,15px);
    line-height:1.1;
    letter-spacing:-.035em;
  }
  .topbar__right {gap:2px;align-items:center;min-width:max-content;}
  .topbar .draw-setting {
    min-height:28px;height:28px;margin:0;
    padding:1px 4px;gap:2px;
    box-shadow:0 1px 2px #6a4c3730;
  }
  .topbar .draw-setting select {margin:0;padding:1px 0;min-width:49px;}
  .topbar .circle-button {
    flex:none;width:28px;height:28px;min-width:28px;min-height:28px;
    padding:5px;margin:0;box-shadow:0 1px 2px #6a4c3730;
  }
  .topbar #appearance-toggle,.topbar #sound-toggle {align-self:center;margin:0;}
}
@media (max-width:360px) and (orientation:portrait) {
  .topbar {padding-inline:3px;gap:1px;}
  .topbar .game-navigation .title-ribbon {font-size:12px;padding:2px 4px;}
  .topbar .game-menu__toggle {min-width:22px;width:22px;height:26px;min-height:26px;}
  .topbar .draw-setting {padding-inline:2px;}
  .topbar .draw-setting select {min-width:46px;font-size:9px;}
  .topbar .circle-button {width:25px;min-width:25px;height:26px;min-height:26px;padding:4px;}
}

/* 0.9.23: rose cut edges are hidden by the opaque game-name plaque.
   Avoid clipping the navigation's ornamental layer outside the plaque. */
@media (min-width:1200px) and (min-height:521px) {
  .topbar .game-navigation { overflow:visible; }
  .topbar .game-navigation .title-ribbon {
    z-index:5; /* above the decorative pseudo-elements, below dropdown panels */
  }
  .topbar .game-navigation .game-menu {z-index:6;}
}

/* 0.9.25: roses belong to the physical title plaque, not to the navigation's
   center point (which varies with menu widths and the current game name).
   Source artwork has a complete rose; no cut petal is exposed. */
.topbar .rg-title-ornaments {display:contents;}
@media (min-width:1200px) and (min-height:521px) {
  .topbar .game-navigation::before,
  .topbar .game-navigation::after {content:none!important;display:none!important;}
  .topbar .game-navigation {gap:clamp(24px,2.5vw,38px);}
  .topbar .game-navigation .rg-title-ornaments {
    display:flex;position:relative;flex:none;align-items:center;
    isolation:isolate;z-index:5;
  }
  .topbar .game-navigation .rg-title-ornaments::before,
  .topbar .game-navigation .rg-title-ornaments::after {
    content:"";display:block;position:absolute;z-index:0;top:50%;
    width:156px;height:52px;
    background:url('/assets/header/rose-sprig.webp') no-repeat center / contain;
    opacity:.98;pointer-events:none;
  }
  .topbar .game-navigation .rg-title-ornaments::before {
    left:-142px;transform:translateY(-50%);
  }
  .topbar .game-navigation .rg-title-ornaments::after {
    right:-142px;transform:translateY(-50%) scaleX(-1);
  }
  .topbar .game-navigation .rg-title-ornaments .title-ribbon {
    position:relative;z-index:2;isolation:isolate;
  }
  .topbar .game-navigation .game-menu {z-index:6;}
}

/* Source: scene-effects.css */
/* v0.7d.2 — gentle candle + sleeping cat motion, artwork-anchored. */
.ambient-layer{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;isolation:isolate}
.ambient-layer[hidden]{display:none!important}
.ambient-steam,.ambient-candle,.ambient-cat,.ambient-cat-breath,.ambient-cat-ear,.ambient-cat-tail,.ambient-mouse,.ambient-victory{position:absolute;pointer-events:none;user-select:none}
.ambient-steam{filter:blur(.4px);opacity:.7}
.ambient-steam i{position:absolute;bottom:3%;left:calc(26% + var(--smoke-index)*19%);width:16%;height:73%;border-left:2px solid rgba(255,245,222,.5);border-radius:46% 35% 52% 40%;transform-origin:50% 100%;animation:rosy-steam 4.6s ease-out infinite;animation-delay:calc(var(--smoke-index)*-1.45s)}
.ambient-steam i:nth-child(2){height:80%;border-color:rgba(255,253,230,.39)}
.ambient-steam i:nth-child(3){height:62%;border-color:rgba(255,246,231,.32)}
/* Candle: two independent bright layers, not a barely visible alpha change.
   The flame itself grows, leans left/right and glows against the painting. */
.ambient-candle{border-radius:50%;mix-blend-mode:screen;opacity:1;background:radial-gradient(ellipse at 50% 53%,rgba(255,237,174,.44) 0%,rgba(255,178,65,.24) 19%,rgba(255,181,82,.10) 38%,rgba(255,183,89,0) 73%);animation:rosy-candle-halo 1.65s ease-in-out infinite}
.ambient-candle::before{content:'';position:absolute;left:50%;top:51%;width:12%;height:24%;transform-origin:50% 85%;border-radius:65% 15% 62% 40% / 80% 45% 55% 50%;background:radial-gradient(ellipse at 49% 67%,#fffdf3 1%,#fff8b8 26%,#ffc45f 58%,rgba(255,119,24,.40) 82%,transparent 100%);filter:drop-shadow(0 0 3px #ffd071) drop-shadow(0 0 5px #f9a244);animation:rosy-flame-body 1.5s ease-in-out infinite alternate}
.ambient-candle::after{content:'';position:absolute;left:44%;top:43%;width:13%;height:33%;border-radius:50%;background:radial-gradient(ellipse,#fff3b3a8 0%,#ffbc4477 35%,transparent 73%);filter:blur(4px);animation:rosy-flame-glimmer 2.05s ease-in-out infinite alternate}
.ambient-candle--bright{animation:rosy-candle-reward 1.5s ease-out 1!important}
.ambient-candle--bright::before{animation-duration:.65s;filter:drop-shadow(0 0 8px #fff4a2) drop-shadow(0 0 20px #fbb34f)}
/* Breathing is the cat's *body* rising, not the entire sofa crop shifting. */
.ambient-cat{object-fit:fill;filter:brightness(1.01)}
.ambient-cat-breath,.ambient-cat-tail,.ambient-cat-ear{object-fit:fill;transform:translateZ(0);will-change:transform}
.ambient-cat-breath{transform-origin:41% 70%;animation:rosy-cat-breathe 3.1s ease-in-out infinite}
.ambient-cat-ear{transform-origin:65% 44%;animation:rosy-cat-ear-flick 8.2s ease-in-out infinite}
.ambient-cat-tail{transform-origin:24% 70%;animation:rosy-cat-tail-flick 10.7s ease-in-out infinite}
.ambient-cat--curious{animation:rosy-cat-curious 1.7s ease-in-out 1!important}
.ambient-cat--happy{animation:rosy-cat-happy 3.2s ease-in-out 1!important}
.ambient-cat-ear--alert{animation:rosy-cat-ear-alert 1.25s ease-in-out 1!important}
.ambient-cat-tail--alert{animation:rosy-cat-tail-alert 1.75s ease-in-out 1!important}
/* Random 20–40 second intervals between mouse appearances under the armchair.
   Transform/opacity only: no perpetual animation, filters, or game hit testing. */
.ambient-mouse{opacity:0;transform:translate(-35%,12%) scale(.78);transform-origin:50% 85%;object-fit:contain}
.ambient-mouse--scouting{will-change:transform,opacity;animation:rosy-mouse-scout 4.8s ease-in-out both}
@keyframes rosy-mouse-scout{
  0%{opacity:0;transform:translate(-35%,12%) scale(.78)}
  10%{opacity:1;transform:translate(1px,2px) scale(.92)}
  36%{opacity:1;transform:translate(var(--mouse-run),0) scale(1)}
  47%{opacity:1;transform:translate(var(--mouse-run),-2px) rotate(-2deg) scale(1)}
  57%{opacity:1;transform:translate(var(--mouse-run),0) rotate(2deg) scale(1)}
  75%{opacity:1;transform:translate(13px,1px) scale(.95)}
  100%{opacity:0;transform:translate(-35%,12%) scale(.78)}
}
.ambient-victory{inset:0;opacity:0;background:radial-gradient(ellipse at 50% 75%,rgba(255,230,166,.34),transparent 57%)}
.ambient-victory--active{animation:rosy-victory-room 4.4s ease-out 1}
.win__sparkles{position:absolute;inset:0;pointer-events:none;overflow:hidden;display:none}
.win--celebrate .win__sparkles{display:block}
.win__sparkles i{position:absolute;left:calc(50% + var(--spark-x)*1px);top:calc(50% + var(--spark-y)*1px);width:9px;height:9px;transform:rotate(45deg);background:#ffe7a9;border-radius:2px;box-shadow:0 0 9px #ffe5a7,0 0 24px #f8cf89;animation:rosy-win-sparkle 1.8s ease-out both;animation-delay:calc(var(--spark-i)*110ms)}
.win__sparkles i:nth-child(2n){width:6px;height:6px;background:#fff9d4}
.win__panel{position:relative;z-index:1}
body[data-ambient-paused="true"] .ambient-layer *,body[data-ambient-paused="true"] .win__sparkles *{animation-play-state:paused!important}
@keyframes rosy-steam{0%{opacity:0;transform:translate(0,10%) rotate(-8deg) scale(.75)}22%{opacity:.75}75%{opacity:.37}100%{opacity:0;transform:translate(34%,-13%) rotate(8deg) scale(1.1)}}
@keyframes rosy-candle-halo{0%,100%{opacity:.68;transform:scale(1)}22%{opacity:.77;transform:scale(1.035,1.02)}48%{opacity:.70;transform:scale(.985,1.01)}72%{opacity:.75;transform:scale(1.025,.99)}}
@keyframes rosy-flame-body{0%{opacity:.88;transform:translate(-50%,-50%) scale(.97,1.01) rotate(-2.5deg)}45%{opacity:.96;transform:translate(-50%,-50.5%) scale(1.025,1.07) rotate(2.5deg)}100%{opacity:.9;transform:translate(-50%,-49.5%) scale(.99,.98) rotate(-1.5deg)}}
@keyframes rosy-flame-glimmer{0%{opacity:.70;transform:translateX(-1%) scale(.98)}100%{opacity:.8;transform:translateX(1%) scale(1.045)}}
@keyframes rosy-cat-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-.22%) scale(1.003,1.016)}}
@keyframes rosy-cat-ear-flick{0%,19%,24%,100%{transform:rotate(0)}20%{transform:rotate(-5deg)}21.5%{transform:rotate(2deg)}23%{transform:rotate(-1deg)}}
@keyframes rosy-cat-tail-flick{0%,36%,44%,100%{transform:rotate(0)}38%{transform:rotate(-5deg)}41%{transform:rotate(2deg)}}
@keyframes rosy-cat-ear-alert{0%,100%{transform:rotate(0)}36%{transform:rotate(-12deg)}68%{transform:rotate(6deg)}}
@keyframes rosy-cat-tail-alert{0%,100%{transform:rotate(0)}35%{transform:rotate(-15deg)}70%{transform:rotate(8deg)}}
@keyframes rosy-cat-curious{0%,100%{transform:none}20%,72%{transform:translateY(-2px) rotate(-1.3deg) scale(1.02)}45%{transform:translateY(-3px) rotate(.8deg) scale(1.016)}}
@keyframes rosy-cat-happy{0%,100%{transform:none}18%,52%{transform:translateY(-3px) rotate(-1.6deg) scale(1.035)}35%,68%{transform:translateY(-1px) rotate(1.5deg) scale(1.02)}}
@keyframes rosy-candle-reward{0%,100%{opacity:.75;transform:scale(1)}38%{opacity:1;transform:scale(1.45)}74%{opacity:.93;transform:scale(1.2)}}
@keyframes rosy-victory-room{0%{opacity:0}20%{opacity:.75}65%{opacity:.4}100%{opacity:0}}
@keyframes rosy-win-sparkle{0%{opacity:0;transform:translateY(20px) rotate(45deg) scale(.4)}40%{opacity:.9}100%{opacity:0;transform:translateY(-90px) rotate(90deg) scale(.3)}}
@media(prefers-reduced-motion:reduce){.ambient-layer,.win__sparkles{display:none!important}}

/* v0.7f.6v: lighter small-screen ambience.
   Keep the steam, flame, mouse and cat animations themselves; remove only
   blur/drop-shadow filters that require extra offscreen compositing on phones. */
@media (max-width: 760px) {
  .ambient-steam,
  .ambient-candle::before,
  .ambient-candle::after {
    filter: none;
  }
}

/* Source: responsive-game-layout.css */
/* RosyGames Engine responsive shell: shared by every solitaire game.
   Game-specific CSS retains visual appearance, button styles and card geometry.
   Markup uses rg-game-layout, rg-game-board and rg-game-controls. */
.rg-game-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto minmax(0,1fr);
  min-width:0;min-height:0;
  --rg-side-width:clamp(124px,17vw,212px);
}
.rg-game-layout > .rg-game-board {
  grid-column:1;grid-row:2;min-width:0;min-height:0;
}
.rg-game-layout > .rg-game-controls {
  grid-column:1;grid-row:1;min-width:0;
}
/* Spider is a 10-column board; its control width is intentionally smaller. */
.spider-game-layout.rg-game-layout {--rg-side-width:minmax(120px,155px);}
@media(max-width:1000px){
  .spider-game-layout.rg-game-layout {--rg-side-width:122px;}
}
/* All landscape devices and desktop pointing devices use a sidebar.
   Portrait touch devices move controls above the cards. */
@media (orientation:landscape), (pointer:fine) and (min-width:700px) {
  .rg-game-layout {
    grid-template-columns:minmax(0,1fr) var(--rg-side-width);
    grid-template-rows:minmax(0,1fr);
  }
  .rg-game-layout > .rg-game-board {grid-column:1;grid-row:1;}
  .rg-game-layout > .rg-game-controls {grid-column:2;grid-row:1;align-self:start;}
}
@media (orientation:landscape) and (max-height:500px){
  .game-layout.rg-game-layout {--rg-side-width:clamp(112px,18vw,148px);}
}

/* Source: game-panel.css */
/* RosyGames Engine — one control appearance for Klondike, Spider and future games. */
.rg-game-panel .rg-panel-button {
  display:flex;align-items:center;justify-content:center;gap:6px;
  min-width:0;min-height:38px;padding:7px 8px;
  color:#385b40;background:linear-gradient(#fff9ee,#ffefdb);
  border:1px solid #dbc3a5;border-radius:999px;
  box-shadow:0 2px 5px #76563b3b,inset 0 1px #fffdf4;
  font:750 clamp(11px,1.25vw,15px)/1.1 Fraunces,Georgia,serif;
  white-space:nowrap;cursor:pointer;
  transition:background-color .12s ease,color .12s ease;
}
.rg-game-panel .rg-panel-button .icon {flex:0 0 auto;width:16px;height:16px;}
.rg-game-panel .rg-panel-button .rg-panel-button__label {font:inherit;min-width:0;}
.rg-game-panel .rg-panel-button--new {
  color:#fffdf7;background:linear-gradient(#ef9a8c,#e47d73);border-color:#da786e;
}
.rg-game-panel .rg-panel-button--undo {
  color:#754a3c;background:linear-gradient(150deg,#f5e3ce,#f6d1ba);
  border:2px solid #c9826b;box-shadow:0 2px 6px #8d5d3f3b,inset 0 1px 1px #fff5e7;
}
.rg-game-panel .rg-panel-button--hint {background:#e7eedc;border-color:#b4c6a8;}
.rg-game-panel .rg-panel-button:hover:not(:disabled) {filter:brightness(1.035);}
.rg-game-panel .rg-panel-button:disabled {opacity:.5;cursor:default;}
.rg-game-panel .rg-panel-button:focus-visible {outline:3px solid #476e46;outline-offset:2px;}
@media (orientation:portrait) {
  .rg-game-panel .rg-panel-button {min-height:36px;padding:6px 3px;font-size:clamp(10px,2.75vw,14px);gap:3px;}
  .rg-game-panel .rg-panel-button .icon {width:clamp(12px,3.2vw,16px);height:clamp(12px,3.2vw,16px);}
}
@media (orientation:landscape) and (max-height:480px) {
  .rg-game-panel .rg-panel-button {min-height:28px;padding:4px 3px;font-size:11px;gap:3px;}
  .rg-game-panel .rg-panel-button .icon {width:13px;height:13px;}
}

/* 0.9.22: stable shared controls surface. No live blur or translucent
   sampling of cards moving behind the panel. Apply after both games' CSS. */
.rg-game-controls.rg-game-panel {
  background:#fff2e5;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  isolation:isolate;
}
.rg-game-panel .rg-panel-button,
.rg-game-panel .rg-panel-button:hover:not(:disabled) {
  filter:none;
  backface-visibility:hidden;
}

/* Source: game-appearance.css */
/* Shared RosyGames Engine scene presets for every supported game.
 * The scene artwork can live in a dedicated .scene (Klondike) or in a
 * background pseudo-layer (Spider). Filters affect scenery, NEVER card art.
 */
body[data-background="cozy-home"] { --rg-room-image:url('/assets/room-tablet.webp'); }
body[data-background="office"] { --rg-room-image:url('/assets/backgrounds/office-phone.webp'); }
body[data-background="cafe"] { --rg-room-image:url('/assets/backgrounds/cafe-phone.webp'); }
body[data-background="park"] { --rg-room-image:url('/assets/backgrounds/park-phone.webp'); }
@media (orientation:landscape) {
  body[data-background="cozy-home"] { --rg-room-image:url('/assets/room-wide.webp'); }
}
@media (max-width:620px) and (orientation:portrait) {
  body[data-background="cozy-home"] { --rg-room-image:url('/assets/room-phone.webp'); }
}
@media (min-aspect-ratio:9/10) {
  body[data-background="office"] { --rg-room-image:url('/assets/backgrounds/office-tablet.webp'); }
  body[data-background="cafe"] { --rg-room-image:url('/assets/backgrounds/cafe-tablet.webp'); }
  body[data-background="park"] { --rg-room-image:url('/assets/backgrounds/park-tablet.webp'); }
}
@media (min-aspect-ratio:8/5) {
  body[data-background="office"] { --rg-room-image:url('/assets/backgrounds/office-wide.webp'); }
  body[data-background="cafe"] { --rg-room-image:url('/assets/backgrounds/cafe-wide.webp'); }
  body[data-background="park"] { --rg-room-image:url('/assets/backgrounds/park-wide.webp'); }
}
body[data-theme="forest"] { --rg-room-filter:none; }
body[data-theme="rose"] { --rg-room-filter:hue-rotate(-18deg) saturate(.92); }
body[data-theme="midnight"] { --rg-room-filter:hue-rotate(32deg) saturate(.86) brightness(.82); }
body[data-theme="evening"] { --rg-room-filter:sepia(.28) saturate(1.1) brightness(.9); }
body .scene {
  background-image:var(--rg-room-image);
  filter:var(--rg-room-filter,none);
}
body.spider-game {background-image:none!important;}
/* One isolated scenic surface so the color filter cannot wash out cards. */
body.spider-game .spider-app::before {
  content:'';
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:#a1a682 var(--rg-room-image) no-repeat center / cover;
  filter:var(--rg-room-filter,none);
}
body.spider-game .spider-app > .spider-game-layout,
body.spider-game .spider-app > .spider-footer {position:relative;z-index:1;}
