/* Smidse panel (smith_ui.js, smith_mock.png): parchment card, glow progress bar, gladiator pills, tabs, 58px rows, bottom sheet */
#smith{left:50%;top:50%;transform:translate(-50%,-50%);width:min(96vw,460px);max-height:94vh;overflow:auto;z-index:7;padding:10px 12px 0;font-family:Alegreya,Georgia,serif}
#smith.hide{display:none}
#smith .shead{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:2px 8px;border-bottom:1px solid #b8892f88;padding-bottom:6px}
#smith .shead h2{margin:0;font-variant:small-caps;font-size:21px}#smith .shead .gold{font-size:17px}#smith .shead small{font-style:italic;color:#6b4a2a}
#smith .runes{grid-column:2/4;justify-self:end}#smith .runes path{fill:none;stroke:#8a6a3a;stroke-width:1.6;stroke-linecap:round}
#smith .sjob{display:flex;gap:10px;align-items:center;margin:8px 0;padding:8px 10px;border:1px solid #b8892f;border-radius:10px;background:#f6ead0aa}
#smith .sjob>i{flex:none;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:24px;color:#f0c060;background:radial-gradient(#5a3418,#2a1808);border:3px double #c8a040;box-shadow:0 0 0 2px #8a6a3a}
#smith .sjob>div{flex:1;min-width:0}#smith .sjob b{display:block;font-size:15px}#smith .sjob em{font-style:normal;font-variant:small-caps;font-weight:bold}#smith .sjob small{display:block;color:#5a4028;font-size:12.5px}
#smith .sjob s{display:block;height:8px;margin:5px 0;border-radius:4px;background:#d9c79a;overflow:hidden}#smith .sjob u{display:block;height:100%;background:linear-gradient(90deg,#b8401a,#f0a030);box-shadow:0 0 8px #f08020}
#smith .sjob .btn{margin-top:6px}#smith .x{border:0;background:none;color:#8a2a1a;font-size:15px;cursor:pointer;padding:0 4px}
#smith .spills{display:flex;gap:6px;overflow-x:auto;padding:2px 0 6px}
#smith .pill{color:#3b2812;flex:none;display:flex;align-items:center;gap:6px;padding:4px 10px 4px 4px;border:1px solid #8a6a3a;border-radius:24px;background:#efe0b8;font:inherit;cursor:pointer;position:relative;min-height:44px}
#smith .pill.on{border:2px solid #2a4a8a;background:#e6dcc0}#smith .pill b{font-size:13px;text-align:left;line-height:1.1}#smith .pill small{display:block;font-weight:normal;color:#6b4a2a;font-size:11px}
#smith .pill em{position:absolute;top:-3px;right:-2px;background:#a02a1a;color:#fff;border-radius:9px;font-size:10px;padding:0 5px;font-style:normal}
#smith .stabs{display:grid;grid-template-columns:repeat(3,1fr);border:2px solid #6b4423;border-radius:8px;overflow:hidden;margin:4px 0 6px}
#smith .stabs .btn{border:0;border-radius:0;min-height:44px;font-family:Cinzel,serif;font-weight:700;font-size:14px;background:#efe0b8;color:#3b2812}#smith .stabs .btn.on{background:#6b4423;color:#f4e6c0}
#smith .stabs em{background:#a02a1a;color:#fff;border-radius:9px;font-size:11px;padding:0 6px;font-style:normal}
#smith .srow{display:flex;align-items:center;gap:10px;min-height:58px;padding:6px 8px;border-bottom:1px dashed #b8892f88;cursor:pointer;border-radius:6px}
#smith .srow.on{border:2px solid #2a4a8a;background:#e6dcc0}#smith .srow.lock{opacity:.55}#smith .srow.lock small{color:#8a2a1a}
#smith .srow>i{flex:none;width:34px;height:34px;border-radius:50%;border:2px solid #b8892f;display:grid;place-items:center;font-style:normal;font-size:17px;background:#f6ead0}
#smith .srow>div{flex:1;min-width:0}#smith .srow b{font-weight:normal;font-size:14.5px}#smith .srow em{font-style:normal;font-weight:bold}#smith .srow small{display:block;color:#6b4a2a;font-size:12px}
#smith .srow>span{text-align:right;white-space:nowrap}#smith .srow>span small{text-align:right}
#smith .auto{display:flex;gap:6px;align-items:center;font-size:13px;padding:6px 4px;min-height:44px}#smith .empty{font-style:italic;color:#6b4a2a;padding:8px}
#smith .ssheet{position:sticky;bottom:0;margin:6px -12px 0;padding:12px 12px 8px;background:radial-gradient(ellipse at 30% 0,#f8ecca,#e6d2a0);border-top:6px solid transparent;border-image:repeating-linear-gradient(90deg,#8a6a2a 0 6px,#d8b050 6px 12px) 6;box-shadow:0 -6px 14px #0004}
#smith .ssheet h3{margin:0;font-variant:small-caps;font-size:19px}#smith .ssheet h3 small{font-size:12px;font-style:italic;color:#5a4028}
#smith .mark{margin:2px 0 6px;font-style:italic;font-size:12.5px;color:#4a3420}
#smith .cmp{display:flex;align-items:center;justify-content:space-around}#smith .cmp>span{font-size:30px;color:#4a3420}
#smith figure{margin:0;text-align:center;font-size:12px}#smith figure svg{border-radius:50%;background:radial-gradient(#fbf2dc,#ecdcb4);border:2px solid #e0c890}#smith figure.na svg{border-color:#d8a040}
#smith figcaption b{display:block;font-variant:small-caps;font-size:15px}
#smith table{width:100%;border-collapse:collapse;font-size:13px;margin:4px 0}#smith td{padding:1px 2px}#smith td:nth-child(2){color:#5a4028}#smith td:last-child{text-align:right;font-weight:bold}
#smith td.up{color:#2f7a2a}#smith td.dn{color:#a02a1a}
#smith .sbtn{display:flex;gap:8px;margin-top:6px}#smith .sbtn .btn{min-height:50px}#smith .sbtn .go{flex:1;font-family:Cinzel,serif;font-weight:700;font-size:16px;color:#f8e8c0;background:linear-gradient(#8a5a2a,#5a3418)}
#smith .sbtn .go:disabled{color:#e8d8b0;opacity:.7}#smith .foot{display:block;text-align:center;font-style:italic;color:#5a4028;margin-top:4px;font-size:11.5px}
@media(max-width:600px){#smith{left:4px;right:4px;top:auto;bottom:4px;transform:none;width:auto;max-height:calc(100vh - 60px)}}
#market h4{margin:8px 0 2px;font-family:Cinzel,serif;font-weight:700;font-size:13px;color:#5a1e0e}
/* short phones: compact sheet so tabs + first rows stay visible above it */
@media(max-height:720px){#smith figure svg{width:64px;height:auto}#smith .ssheet{padding:8px 10px 6px}#smith .ssheet h3{font-size:16px}#smith .mark{margin:0 0 2px;font-size:11.5px}
  #smith figcaption{font-size:11px}#smith figcaption b{font-size:13px;display:inline;margin-right:4px}#smith .cmp>span{font-size:22px}#smith table{font-size:12px;margin:2px 0}
  #smith .sbtn .btn{min-height:44px}#smith .sjob{margin:6px 0;padding:6px 8px}#smith .sjob>i{width:40px;height:40px;font-size:19px}}
.ssheet .wtn{margin:4px 0 0;font-size:12px;color:#8a3a1a}
