html,body{width:100%;height:100%;overflow:hidden;background:#100d24;color:#fff;font-family:system-ui,"PingFang SC",sans-serif}button{font:inherit;color:inherit;cursor:pointer;border:1px solid #ffb968;border-radius:10px;background:#29223e;min-height:44px;padding:9px 18px;touch-action:manipulation}button:focus-visible{outline:3px solid #fff;outline-offset:3px}button:disabled{opacity:.45;cursor:default}[hidden]{display:none!important}#game{position:absolute;top:0;left:0;width:100vw;height:100dvh;overflow:hidden}.scene,.table{position:absolute;inset:0}.scene-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.home-controls{position:absolute;right:5%;top:22%;width:30%;max-width:400px;padding:16px;border:1px solid #ffa25188;border-radius:18px;background:#131027df;box-shadow:0 8px 28px #0007}.home-controls h1{font-size:clamp(22px,4vw,48px);color:#ffbd69;margin:0 0 4px;text-shadow:2px 3px #603319}.subtitle,.note{font-size:clamp(10px,1.3vw,14px);color:#d6c9df;margin:8px 0 12px}.primary{background:linear-gradient(#ffb75d,#ed6928);color:#281222;font-weight:800;box-shadow:0 4px 0 #7d361d;width:100%;font-size:clamp(17px,2.2vw,26px)}.difficulty{display:flex;gap:6px;border:0;padding:12px 0;margin:0}.difficulty legend{font-size:12px;color:#e7d4e5;padding-top:12px}.difficulty button{flex:1;padding:8px 3px;font-size:14px}.difficulty button[aria-pressed=true]{background:#ff8a3d;color:#241222;box-shadow:0 0 0 2px #ffdf9c}.secondary{width:100%}.secondary i{vertical-align:middle;margin-right:7px}.table{display:flex;flex-direction:column;padding:10px 14px;background:radial-gradient(ellipse at top,#33345c,#12152b 80%)}.table-tools,.table-bottom{display:flex;align-items:center;gap:12px;flex-shrink:0;font-size:14px}.table-tools button{min-height:40px;padding:7px 12px}.table-tools #undo{margin-left:auto}.columns{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px;flex:1;min-height:0;margin:12px 0;overflow-y:auto;align-items:start;touch-action:none}.column{position:relative;min-height:105px;border:1px dashed #ffb96855;border-radius:8px;padding-bottom:4px}.playing-card{position:relative;width:100%;height:clamp(66px,17vh,110px);border:1px solid #bdb9cb;border-radius:6px;background:#fff6e6;color:#22203b;font-weight:800;padding:4px 6px;text-align:left;margin-bottom:calc(-1 * clamp(44px,11vh,76px));box-shadow:0 2px 3px #0006;min-height:0;display:block;touch-action:none;font-size:clamp(15px,2.1vw,24px)}.playing-card:last-child{margin-bottom:0}.playing-card.red{color:#b62c3b}.playing-card.face-down{background:repeating-linear-gradient(45deg,#302653,#302653 5px,#4c3b70 5px,#4c3b70 7px);border:2px solid #e2b778;color:transparent}.playing-card.selected{outline:3px solid #ff8a3d;z-index:2;filter:brightness(1.1)}.playing-card .suit{display:block;font-size:.85em}.table-bottom{justify-content:space-between;min-height:44px}.table-bottom #message{color:#e0d7ed;font-size:12px}.large-cards .playing-card{font-size:26px}dialog{background:#211d36;color:#fff;border:1px solid #ff8a3d;border-radius:18px;width:min(420px,85vw);padding:24px;box-shadow:0 15px 60px #0009}dialog::backdrop{background:#080713bb}dialog h2{margin:0 0 16px;color:#ffb569}dialog p{line-height:1.7;color:#d5cce0;font-size:14px}dialog button{margin-top:12px}dialog label{display:block;min-height:44px}dialog input{accent-color:#ff8a3d}#restart{width:100%}@media(max-height:450px){.home-controls{top:6%;padding:12px}.home-controls h1{font-size:26px}.subtitle{margin:4px 0 8px}.note{margin:6px 0 0}.difficulty{padding:5px 0}.difficulty legend{padding-top:6px}.table{padding:6px 10px}.columns{margin:6px 0}.table-tools{gap:8px;font-size:12px}.table-tools button{min-height:36px}.table-bottom{min-height:38px}}@media(orientation:portrait){#game{width:100dvh;height:100vw;transform:rotate(90deg) translateY(-100%);transform-origin:top left}.home-controls{top:8%;width:34%;padding:12px}.home-controls h1{font-size:26px}.columns{gap:5px}.playing-card{height:78px;margin-bottom:-54px;font-size:18px}.playing-card:last-child{margin-bottom:0}.table-tools{gap:8px;font-size:12px}.note,.subtitle{font-size:11px}}

/* 首页牌面花色展示独立定位，不占用原有操作区布局。 */
.home-suits{position:absolute;left:12%;bottom:12%;width:40%;display:flex;justify-content:center;gap:clamp(6px,1.5vw,20px);pointer-events:none}
.home-suit{display:flex;align-items:center;justify-content:center;width:clamp(38px,6vw,76px);height:clamp(48px,8vw,96px);border:1px solid #bdb9cb;border-radius:6px;background:#fff6e6;color:#22203b;font-family:Georgia,"Times New Roman",serif;font-size:clamp(28px,4.5vw,56px);line-height:1;box-shadow:0 2px 3px #0006}
.home-suit.red{color:#b62c3b}

/* 封面视觉层：保留原图与操作区域，只补充标题和柔和多彩光晕。 */
#home{isolation:isolate;background:#123d32}
#home .scene-art{z-index:0}
.cover-decor{position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(ellipse at 8% 12%,#7952be66,transparent 42%),radial-gradient(ellipse at 48% 0%,#2caddd44,transparent 42%),radial-gradient(ellipse at 3% 95%,#e9ac4044,transparent 38%),radial-gradient(ellipse at 95% 90%,#ff8a3d33,transparent 38%)}
.cover-heading{position:absolute;top:5%;left:5%;width:55%;z-index:2;text-align:center;pointer-events:none}
.cover-eyebrow{margin:0 0 2px;color:#ffe6ac;font-size:clamp(11px,1.5vw,18px);letter-spacing:.4em;text-shadow:0 2px 5px #143a32}
#cover-title{margin:0;color:#fff6da;font-size:clamp(34px,6.5vw,86px);font-weight:900;letter-spacing:.1em;line-height:1.25;-webkit-text-stroke:1px #e8b958;paint-order:stroke fill;text-shadow:0 3px 0 #9b5d27,0 6px 0 #533321,0 9px 18px #082e29}
#home .home-controls{z-index:3;border-color:#ffd68c99;background:linear-gradient(145deg,#163d35ed,#182d35ed);box-shadow:0 8px 28px #001b2370,inset 0 1px 0 #ffe4a633}
#home .subtitle{color:#fff0d1}
#home .note{color:#d4e5d9}
#home .difficulty legend{color:#f6dfaf}
#home .difficulty button,#home .secondary{background:#22483f;border-color:#c5b47d99}
#home .difficulty button[aria-pressed=true]{background:#ff8a3d;color:#241222}
#home .home-suits{z-index:2}
@media(max-height:450px){.cover-heading{top:5%}#cover-title{font-size:clamp(32px,6vw,64px)}.cover-eyebrow{font-size:12px}}
@media(orientation:portrait){#cover-title{font-size:clamp(32px,8vh,68px)}.cover-eyebrow{font-size:12px}}

/* 仅更新对局卡牌的表面装饰；尺寸、叠放间距和命中区域沿用原值。 */
#table .playing-card:not(.face-down){
  color:#202a3b;
  border-color:#c9b994;
  background-color:#fff9eb;
  background-image:radial-gradient(ellipse at 72% 74%,#c6d7e655,transparent 65%),repeating-linear-gradient(0deg,#b49b6a0b 0 1px,transparent 1px 3px),repeating-linear-gradient(90deg,#b49b6a0d 0 1px,transparent 1px 3px),linear-gradient(135deg,#fffdf5,#f5e9d2);
  box-shadow:inset 0 0 0 1px #fff9ee, inset 0 0 0 3px #c5a97033,0 2px 4px #080e2d55;
  isolation:isolate;
  overflow:hidden;
}
#table .playing-card.red:not(.face-down){
  color:#c2263f;
  background-image:radial-gradient(ellipse at 72% 74%,#f4b3a44a,transparent 65%),repeating-linear-gradient(0deg,#b49b6a0b 0 1px,transparent 1px 3px),repeating-linear-gradient(90deg,#b49b6a0d 0 1px,transparent 1px 3px),linear-gradient(135deg,#fffdf5,#f8e7d6);
}
#table .playing-card:not(.face-down)>span:first-child{
  position:relative;
  z-index:2;
  display:block;
  line-height:1;
  width:fit-content;
  font-weight:900;
  -webkit-text-stroke:.6px #fff6e6;
  paint-order:stroke fill;
  text-shadow:0 1px #fffdf1;
}
#table .playing-card:not(.face-down) .suit{
  position:absolute;
  right:5px;
  top:3px;
  inset:auto;
  width:auto;
  height:auto;
  display:block;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(11px,1.5vw,16px);
  line-height:1;
  text-shadow:none;
  -webkit-text-stroke:0;
  pointer-events:none;
  z-index:1;
}
#table .playing-card:not(.face-down)::after{
  content:"";
  position:absolute;
  inset:5px;
  border:1px solid #bca37955;
  border-radius:3px;
  background:radial-gradient(circle at 50% 50%,transparent 45%,#c7a25915 46%,transparent 48%);
  pointer-events:none;
  z-index:-1;
}
#table .playing-card.face-down{
  border-color:#ddbd80;
  background:#21365b url("images/card-back-pattern.svg") center/100% 100% no-repeat;
  box-shadow:inset 0 0 0 1px #fff0bc66,0 2px 4px #080e2d55;
}
#table .playing-card.selected{
  box-shadow:inset 0 0 0 1px #fff3d9,0 0 0 1px #ff8a3d,0 3px 6px #080e2d66;
}
