/* Turnleaves fitting room — brass-rubbed dark oak, red linen stitching and pale garment labels. */
.hw-page,.hw-dialog{--hw-paper:#f0e1c0;--hw-muted:#b5a78e;--hw-night:#191611;--hw-wood:#28221b;--hw-line:#554a3b;--hw-red:#aa4c38;--hw-gold:#dbb775;color:var(--hw-paper);font:17px/1.35 Alegreya,Georgia,serif;color-scheme:dark;box-sizing:border-box;}
.hw-page{margin:0;min-height:100dvh;background:#17130f radial-gradient(ellipse at 50% 15%,#352d23,transparent 70%);}
.hw-dialog{border:1px solid #766548;padding:0;background:#1d1914;width:min(1250px,96vw);max-width:96vw;max-height:95dvh;overflow:auto;box-shadow:0 22px 85px #000b;}
.hw-dialog::backdrop{background:rgba(8,7,6,.72);backdrop-filter:blur(3px);}
.hw-root{position:relative;max-width:1370px;margin:0 auto;padding:clamp(14px,2.5vw,36px);box-sizing:border-box;}
.hw-root *, .hw-root *::before,.hw-root *::after{box-sizing:border-box;}
.hw-root h1,.hw-root h2,.hw-root h3,.hw-root p{margin:0;}.hw-root button,.hw-root select,.hw-root a{font:inherit;}.hw-root button,.hw-root select{cursor:pointer;}.hw-root button:focus-visible,.hw-root select:focus-visible,.hw-root a:focus-visible,.hw-root input:focus-visible{outline:2px solid #f5d894;outline-offset:3px;}
.hw-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:clamp(12px,1.4vw,22px);border-bottom:1px solid #6d543d;padding-bottom:15px;position:relative;}
.hw-head::after,.hw-thread::after{content:'';position:absolute;left:0;bottom:-3px;width:106px;height:6px;background:repeating-linear-gradient(45deg,transparent 0 4px,#ae513b 4px 6px,transparent 6px 9px),repeating-linear-gradient(-45deg,transparent 0 4px,#ae513b 4px 6px,transparent 6px 9px);}
.hw-kicker,.hw-index,.hw-key,.hw-label,.hw-pane small{font-family:'Alegreya SC',Georgia,serif;font-weight:700;letter-spacing:.08em;font-size:.76rem;color:var(--hw-gold);}
.hw-head h1{font:700 clamp(29px,3.1vw,46px)/1.0 'Alegreya SC',Georgia,serif;letter-spacing:-.025em;margin:.12em 0 .04em;}
.hw-home,.hw-close{color:var(--hw-paper);background:#29231b;border:1px solid #655940;border-radius:2px;text-decoration:none;padding:7px 15px;white-space:nowrap;box-shadow:inset 0 0 0 2px #262018;}.hw-home:hover,.hw-close:hover{border-color:var(--hw-gold)}
.hw-layout{display:grid;grid-template-columns:minmax(147px,.69fr) minmax(340px,2.0fr) minmax(203px,.9fr);gap:clamp(12px,2vw,28px);align-items:start;}
.hw-pane h2{font:700 21px/1.07 'Alegreya SC',Georgia,serif;color:var(--hw-paper);}.hw-thread{position:relative;border-bottom:1px solid #4e4335;padding:3px 0 10px;margin-bottom:12px;}.hw-thread::after{width:36px;}
.hw-garment-group{margin:15px 0;}.hw-garment-group h3{font:600 .8rem/1.2 'Alegreya SC',Georgia,serif;color:var(--hw-muted);letter-spacing:.06em;margin-bottom:4px;}
.hw-garment{display:flex;align-items:center;gap:9px;text-align:left;width:100%;color:#d5c7ab;border:1px solid transparent;border-bottom:1px solid #393027;border-radius:2px;background:none;padding:5px 6px;line-height:1.1;font-size:1rem;}
.hw-garment img{width:31px;height:34px;object-fit:contain;flex:none;}.hw-garment[aria-pressed=true],.hw-garment:hover{background:linear-gradient(95deg,#54463277,#32291f44);border-color:#715e40;color:#f7e6bf;}.hw-garment[aria-pressed=true]::after{content:'◆';margin-left:auto;font-size:8px;color:#d8ad62;}
.hw-stage{border:1px solid #675641;position:relative;background-color:#28251d;background-image:radial-gradient(ellipse at 51% 42%,#595548a8,transparent 65%),linear-gradient(115deg,#332e2599,#272620 55%,#2d241d 90%);box-shadow:inset 0 0 0 4px #1c191799,inset 0 0 0 5px #5d4e3580;overflow:hidden;border-radius:3px;}
.hw-stage::before{content:'';position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(105deg,#fff1 0px,#fff0 1px,#0000 3px,#0000 6px);opacity:.1;}
.hw-stage-top,.hw-stage-bottom{position:absolute;z-index:1;display:flex;align-items:center;gap:8px;left:15px;right:15px;justify-content:space-between;pointer-events:none;}.hw-stage-top{top:11px;}.hw-stage-bottom{bottom:15px;}.hw-stage-top span:last-child{color:var(--hw-muted);font-size:.78rem;font-style:italic;}
.hw-canvases{display:grid;grid-template-columns:1fr;align-items:stretch;min-height:0;height:clamp(350px,52vh,550px);padding:35px 12px 40px;position:relative;}.hw-canvas-figure{margin:0;min-width:0;display:grid;grid-template-rows:minmax(0,1fr) auto;}.hw-canvas-figure canvas{width:100%;height:100%;display:block;min-height:0;}.hw-canvas-figure figcaption{text-align:center;font:700 14px 'Alegreya SC',Georgia,serif;color:#e8d7b0;}.hw-canvases.is-compare{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;}.hw-canvases.is-compare figure+figure{border-left:1px solid #79695055;}
.hw-portrait{display:block;position:relative;height:clamp(350px,52vh,550px);width:100%;object-fit:contain;padding:28px 18px 38px;}.hw-root [hidden]{display:none!important;}
.hw-stage-title{margin-inline:2px;color:var(--hw-paper);font:700 clamp(18px,2.3vw,31px)/1.05 'Alegreya SC',Georgia,serif;text-shadow:0 1px 8px #000;}.hw-stage-title small{display:block;font-size:.78rem;font-style:italic;color:#c7b69d;font-family:Alegreya,Georgia,serif;line-height:1.2;margin-top:3px;}.hw-flip{pointer-events:auto;border:1px solid #77674b;color:var(--hw-paper);background:#29241dd9;border-radius:2px;padding:3px 8px;font-size:.8rem!important;}.hw-flip:hover{border-color:var(--hw-gold);}
.hw-modebar,.hw-actionbar{display:flex;gap:4px;flex-wrap:wrap;align-items:center;}.hw-modebar{margin-bottom:8px;}.hw-modebar button,.hw-actionbar button{background:transparent;border:1px solid transparent;color:var(--hw-muted);padding:4px 8px;line-height:1.1;}.hw-modebar button{font:700 .87rem 'Alegreya SC',Georgia,serif;}.hw-modebar button[aria-pressed=true],.hw-actionbar button[aria-pressed=true]{background:#403527;color:#f6dfb0;border-color:#7d6645;}.hw-modebar button:hover,.hw-actionbar button:hover{color:#f4d996;}
.hw-actionbar{padding-top:12px;font-size:.89rem;}.hw-track{display:flex;align-items:center;gap:10px;margin:10px 0 0;color:var(--hw-muted);font-size:.82rem;}.hw-play{color:#e2c99a;background:#382e22;border:1px solid #665339;min-width:70px;padding:4px 8px;}.hw-track input{width:100%;min-width:0;accent-color:#c6a564;}.hw-counter{white-space:nowrap;font-variant-numeric:tabular-nums;}
.hw-variants{display:grid;gap:5px;margin-bottom:18px;}.hw-variant{width:100%;display:grid;grid-template-columns:2rem 1fr;align-items:center;gap:8px;text-align:left;color:var(--hw-paper);background:#28221a;border:1px solid #4e4537;border-radius:2px;padding:7px 8px;line-height:1.1;}.hw-variant[aria-pressed=true]{border-color:#bd975b;background:linear-gradient(100deg,#5b482d88,#33291e);}.hw-variant span:first-child{font:600 16px/1 'Alegreya SC',serif;letter-spacing:.03em;color:#c7a365;text-align:center;border-right:1px solid #756449;}.hw-variant small{display:block;font:italic 13px/1.15 Alegreya,serif;letter-spacing:0;color:var(--hw-muted);margin-top:3px;}.hw-weapons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:9px 0 6px;}.hw-weapon{min-width:0;aspect-ratio:1;border:1px solid #544a39;background:radial-gradient(ellipse at center,#3f382b,#211c16);border-radius:2px;padding:3px;}.hw-weapon img{width:100%;height:100%;object-fit:contain;}.hw-weapon[aria-pressed=true],.hw-weapon:hover{border-color:#dbb66b;box-shadow:inset 0 0 0 1px #ae8b514d;}.hw-selected-weapon{color:var(--hw-muted);font-size:.93rem;}.hw-apply{display:block;width:100%;margin-top:14px;background:linear-gradient(#e7ce91,#c59b5b);border:1px solid #dbc28a;box-shadow:inset 0 0 0 2px #977039;color:#2a1d0d;font:700 1rem 'Alegreya SC',Georgia,serif!important;padding:8px 6px;}.hw-apply:disabled{cursor:default;background:#342c22;color:#a99b84;border-color:#554b3c;box-shadow:none;}.hw-message{font-size:.88rem;color:var(--hw-muted);margin-top:7px!important;min-height:1.5em;}.hw-footnote{border-top:1px solid #4b4034;margin-top:20px;padding-top:8px;color:#a39377;font-size:.84rem;}
.hw-launch{font-family:'Alegreya SC',Georgia,serif!important;cursor:pointer;}.hw-launch svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.7;}.tl-dock.hw-with-launch{grid-template-columns:repeat(6,minmax(0,1fr))!important;}.tl-dock .hw-launch{display:flex;align-items:center;flex-direction:column;justify-content:center;gap:3px;}.hw-launch.hwn-setup,.hw-launch.hwn-bag{display:inline-flex;gap:7px;align-items:center;justify-content:center;border:1px solid var(--tl-edge,#756544);background:var(--tl-soft,#33291e);color:var(--tl-ink,#e9dbbd);padding:4px 10px;border-radius:2px;white-space:nowrap;box-shadow:none;}.hw-launch.hwn-setup{align-self:end;justify-self:start;margin:3px 0;font-size:13px!important;min-height:28px;}.hw-launch.hwn-bag{margin:5px 0 2px 0;font-size:14px!important;}
@media(max-width:900px){.hw-layout{grid-template-columns:minmax(125px,.65fr) minmax(275px,1.65fr) minmax(156px,.8fr);gap:12px;}.hw-garment{font-size:.92rem;gap:4px;padding-inline:2px;}.hw-garment img{width:25px;height:30px;}.hw-dialog{width:98vw;max-width:98vw;}.hw-root{padding:12px;}.hw-weapons{gap:3px;}.hw-variant{padding:6px 4px;gap:1px;grid-template-columns:1.6rem 1fr;}.hw-variant small{font-size:12px;}.hw-modebar button,.hw-actionbar button{padding:4px;}}
@media(max-width:660px){.hw-head{margin-bottom:8px;padding-bottom:10px;}.hw-head h1{font-size:27px;}.hw-layout{display:flex;flex-direction:column;gap:12px;}.hw-armors,.hw-central,.hw-options{width:100%;}.hw-armors .hw-thread{display:none;}.hw-armors-inner{display:flex;overflow-x:auto;gap:5px;scrollbar-width:thin;padding:4px 0 6px;}.hw-garment-group{display:contents;}.hw-garment-group h3{display:none;}.hw-garment{flex:none;width:auto;border:1px solid #4b4133;padding:3px 7px;}.hw-garment[aria-pressed=true]::after{display:none;}.hw-garment img{width:21px;height:24px;}.hw-canvases,.hw-portrait{height:clamp(290px,48dvh,425px);}.hw-modebar{margin-bottom:6px;}.hw-options{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;}.hw-options .hw-thread{margin:4px 0 7px;padding-bottom:5px;}.hw-variants{gap:3px;margin:0;}.hw-apply,.hw-message{grid-column:1/-1;margin-top:0!important;}.hw-weapons{grid-template-columns:repeat(6,minmax(0,1fr));}.hw-footnote{margin-top:12px;}.hw-dialog{max-height:98dvh;}.hw-variant small{display:none;}.hw-stage-title{font-size:20px;}.hw-head .hw-home,.hw-head .hw-close{padding:5px 8px;}.hw-actionbar{padding-top:6px;}.hw-track{margin-top:5px;}}
@media(max-width:410px){.hw-options{grid-template-columns:.9fr 1.1fr;}.hw-weapons{grid-template-columns:repeat(4,minmax(0,1fr));}.hw-variant{font-size:.94rem!important;}.hw-canvases,.hw-portrait{height:290px;}}

.hw-stage-tools{display:flex;align-items:center;gap:5px;pointer-events:auto}.hw-stage-tools a{text-decoration:none}
/* Keep the identification plate below the drawings so it never covers a compared look. */
.hw-stage-bottom{position:relative;left:auto;right:auto;bottom:auto;min-height:57px;padding:1px 16px 14px;gap:12px;}
.hw-canvases,.hw-portrait{height:clamp(330px,52vh,555px);padding-bottom:5px;}
.hw-canvases.is-compare{padding-bottom:3px;}.hw-canvases.is-compare figcaption{padding-top:4px;}
@media(max-width:660px){.hw-canvases,.hw-portrait{height:clamp(257px,42dvh,360px);padding-bottom:2px;}.hw-stage-bottom{min-height:44px;padding:2px 12px 11px;}.hw-stage-tools a,.hw-stage-tools button{font-size:.73rem!important;padding:3px 5px;}}
.hw-stage-tools a,.hw-stage-tools button{white-space:nowrap}.hw-canvases.is-compare figure[data-hw-selected=true] figcaption{color:#e6bb76;}

/* Size the six camp controls to their labels while keeping them in one row. */
@media (max-width: 540px) {
  #tl-contracts-attunement .tl-dock.hw-with-launch {
    grid-template-columns: repeat(6, auto) !important;
    column-gap: 2px;
  }

  #tl-contracts-attunement .tl-dock.hw-with-launch > button {
    padding-inline: 2px;
  }
}
