/* Shop Titans compact 4-column storage and modal interface (v2) */
#shop .shcv2-storage {margin-top:8px}
#shop .shcv2-panel-head, #shop .shcv2-special-head {
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px
}
#shop .shcv2-panel-head h3, #shop .shcv2-special-head h3 {
  margin:0;font-size:15px;font-weight:800;color:#1d3b5b
}
#shop .shcv2-panel-head p,#shop .shcv2-special-head span {
  margin:3px 0 0;font-size:11px;color:#61758f
}
#shop .shcv2-open,#shop .shcv2-text-btn,#shop .shcv2-close,#shop .shcv2-add,#shop .shcv2-done {
  border:1px solid #b9cce2;color:#244765;background:#fff;border-radius:7px;
  font-size:11px;cursor:pointer;font-weight:700;white-space:nowrap
}
#shop .shcv2-open {padding:7px 11px}
#shop .shcv2-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
#shop .shcv2-card {min-width:0;border:1px solid #d9e4ef;border-radius:9px;padding:10px;background:#f8fbff}
#shop .shcv2-card-head {display:flex;gap:6px;align-items:center;justify-content:space-between;margin-bottom:6px}
#shop .shcv2-card-head b{color:#1c3f64;font-size:13px}
#shop .shcv2-card-head small{color:#71849a;font-size:10px;white-space:nowrap}
#shop .shcv2-row{padding:5px 0;border-top:1px solid #e2eaf4}
#shop .shcv2-row-main{display:grid;grid-template-columns:40px minmax(0,1fr) 37px;align-items:center;gap:3px}
#shop .shcv2-row-main strong{color:#3a5976;font-size:11px}
#shop .shcv2-row-main span{justify-self:end;font-size:14px;font-weight:800;color:#203b56;font-variant-numeric:tabular-nums;white-space:nowrap}
#shop .shcv2-row-main small{font-size:11px;color:#76869b;font-weight:500}
#shop .shcv2-row-main em{font-size:10px;font-style:normal;font-weight:800;text-align:right}
#shop .shcv2-row-main em.ok,#shop .shcv2-special-card em.ok{color:#207952}
#shop .shcv2-row-main em.bad,#shop .shcv2-special-card em.bad{color:#b64e39}
#shop .shcv2-decision{display:flex;flex-wrap:wrap;justify-content:space-between;gap:3px;font-size:10px;font-weight:700;color:#46617d;margin-top:4px;line-height:1.4}
#shop .shcv2-decision span{font-weight:500;color:#637d95}
#shop .shcv2-text-btn{font-size:10px;margin-top:6px;padding:4px 7px;width:100%;text-align:center}
#shop .shcv2-footnote{font-size:10px;color:#778ba0;margin:8px 0 1px;line-height:1.5}
#shop .shcv2-special {margin:8px 0 11px;border:1px solid #d9e2ed;border-radius:11px;padding:10px 13px;background:#fff}
#shop .shcv2-special-head{margin-bottom:8px}
#shop .shcv2-special-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
#shop .shcv2-special-card {
  min-width:0;display:flex;align-items:center;gap:7px;flex-wrap:wrap;text-align:left;
  border:1px solid #dce6f2;border-radius:9px;background:#f8fbff;padding:9px 10px;cursor:pointer;color:#203b56
}
#shop .shcv2-special-card>span{font-size:12px;font-weight:800;min-width:45px}
#shop .shcv2-special-card>strong{font-size:18px;font-variant-numeric:tabular-nums}
#shop .shcv2-special-card>small{font-size:10px;color:#6c8094;flex-basis:100%}
#shop .shcv2-special-card>em{font-size:10px;font-style:normal;font-weight:700}
#shop .shcv2-backdrop{position:fixed;inset:0;z-index:5000;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(17,32,48,.62)}
#shop .shcv2-dialog{display:flex;flex-direction:column;overflow:hidden;width:min(1360px,98vw);max-height:min(92vh,1000px);background:#fff;color:#203b56;border-radius:14px;border:1px solid #cbd8e7;box-shadow:0 20px 64px rgba(0,0,0,.28)}
#shop .shcv2-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 17px;border-bottom:1px solid #dce5f0}
#shop .shcv2-modal-head h2{font-size:19px;color:#1b3958;margin:0}
#shop .shcv2-modal-head p{font-size:11px;color:#75869a;margin:3px 0 0}
#shop .shcv2-close{font-size:15px;width:30px;height:30px}
#shop .shcv2-dialog-body{overflow:auto;min-height:0;padding:12px 15px;overscroll-behavior:contain}
#shop .shcv2-settings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}
#shop .shcv2-settings label{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:11px;color:#5d7084;font-weight:650}
#shop .shcv2-settings input{font-size:13px;border:1px solid #c3d1df;border-radius:7px;padding:6px 8px;width:100%;min-width:0;color:#233e5a;background:#fff}
#shop .shcv2-modal-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
#shop .shcv2-modal-group{border:1px solid #d7e2ef;background:#f7faff;border-radius:9px;padding:8px;min-width:0}
#shop .shcv2-modal-group h3,#shop .shcv2-modal-special h3{margin:0 0 7px;font-size:13px;color:#1d3b5b}
#shop .shcv2-resource{background:#fff;border:1px solid #e0e8f0;border-radius:8px;padding:8px;margin-bottom:8px;min-width:0}
#shop .shcv2-resource-head{display:flex;align-items:center;gap:8px;justify-content:space-between}
#shop .shcv2-resource-head>b{font-size:12px;color:#244460;white-space:nowrap}
#shop .shcv2-resource-head label{display:flex;flex-direction:column;gap:3px;max-width:120px;color:#728398;font-size:10px}
#shop .shcv2-resource-head input{width:100%;min-width:0;font-size:12px;border:1px solid #bbccde;border-radius:6px;padding:5px 6px;color:#203b56;background:#fff}
#shop .shcv2-bin{display:grid;grid-template-columns:56px minmax(0,1fr) minmax(0,1fr);gap:6px;align-items:end;margin-top:6px}
#shop .shcv2-bin>label{display:flex;flex-direction:column;min-width:0;gap:3px;color:#728398;font-size:10px}
#shop .shcv2-bin input[type="number"]{width:100%;min-width:0;font-size:12px;border:1px solid #bbccde;border-radius:6px;padding:5px 5px;color:#203b56;background:#fff}
#shop .shcv2-active{flex-direction:row!important;align-items:center;gap:3px!important;padding-bottom:7px;font-weight:700;white-space:nowrap}
#shop .shcv2-active input{accent-color:#1768ae;width:13px;height:13px}
#shop .shcv2-add{margin-top:7px;padding:5px 7px}
#shop .shcv2-modal-special{margin-top:12px;border-top:1px solid #dce5ee;padding-top:10px}
#shop .shcv2-help{font-size:11px;line-height:1.65;color:#657990;margin:12px 0 0}
#shop .shcv2-modal-foot{display:flex;justify-content:space-between;align-items:center;gap:15px;border-top:1px solid #dce5ef;padding:10px 15px;background:#f8fbff}
#shop .shcv2-modal-foot span{font-size:11px;color:#6d8095}
#shop .shcv2-done{padding:7px 16px}
#shop .shcv2-storage button:hover,#shop .shcv2-special-card:hover,#shop .shcv2-dialog button:hover{background:#eaf3ff;border-color:#8db7e4}
@media(max-width:1100px){
 #shop .shcv2-grid,#shop .shcv2-modal-grid,#shop .shcv2-settings{grid-template-columns:repeat(2,minmax(0,1fr))}
 #shop .shcv2-special-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:640px){
 #shop .shcv2-grid,#shop .shcv2-modal-grid,#shop .shcv2-settings,#shop .shcv2-special-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #shop .shcv2-row-main{grid-template-columns:30px minmax(0,1fr)}
 #shop .shcv2-row-main em{grid-column:2;text-align:right}
 #shop .shcv2-decision{font-size:9px}
 #shop .shcv2-panel-head{align-items:flex-start}
 #shop .shcv2-panel-head p{max-width:180px}
 #shop .shcv2-backdrop{padding:5px}
 #shop .shcv2-dialog{max-height:96vh;width:100%}
 #shop .shcv2-dialog-body{padding:9px}
 #shop .shcv2-modal-foot span{font-size:9px}
}
@media(max-width:370px){
 #shop .shcv2-grid,#shop .shcv2-modal-grid,#shop .shcv2-settings,#shop .shcv2-special-grid{grid-template-columns:1fr}
}
/* Blueprint category hierarchy: major classification above detailed type. */
#shop .sh-c-four .sh-c-line-main .sh-c-type{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  min-width:0;
  padding:4px 2px;
  line-height:1.15;
}
#shop .sh-c-four .sh-c-type-parent{
  display:block;
  max-width:100%;
  color:#5d748d;
  font-size:9px;
  font-weight:650;
  line-height:1.2;
  white-space:nowrap;
}
#shop .sh-c-four .sh-c-type-child{
  display:block;
  max-width:100%;
  color:#1d3b5b;
  font-size:11px;
  font-weight:800;
  line-height:1.2;
  overflow-wrap:anywhere;
  word-break:keep-all;
}
@media(max-width:620px){
  #shop .sh-c-four .sh-c-type-parent{font-size:8px}
  #shop .sh-c-four .sh-c-type-child{font-size:10px}
}

/* Acquired blueprint control: compact enough for four-column craft board. */
#shop .sh-c-four .sh-c-title-line{
  display:flex;align-items:center;min-width:0;gap:4px;
}
#shop .sh-c-four .sh-c-title-line>b{
  flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
#shop .sh-c-four .sh-c-owned-toggle{
  flex:0 0 auto;font-size:9px;font-weight:800;line-height:1.25;
  border-radius:4px;padding:2px 4px;cursor:pointer;
  transition:background-color .12s,border-color .12s;
}
#shop .sh-c-four .sh-c-owned-toggle.owned{
  color:#18744c;background:#e8f6ed;border:1px solid #a7d4b8;
}
#shop .sh-c-four .sh-c-owned-toggle.unowned{
  color:#8b5c38;background:#faf1e7;border:1px solid #e6ceb4;
}
#shop .sh-c-four .sh-c-family-column .sh-c-line.unowned{
  background:#f7f9fc;border-bottom-color:#e2e8f1;
}
#shop .sh-c-four .sh-c-family-column .sh-c-line.unowned .sh-c-name b{
  color:#6e7c8e;
}
#shop .sh-c-four .sh-c-family-column .sh-c-item-status.unowned{
  color:#9a6b40;
}
#shop .sh-c-four .sh-c-line.unowned .sh-c-quick-complete:disabled,
#shop .sh-c-four .sh-c-line.unowned .sh-c-count input:disabled{
  opacity:.38;cursor:not-allowed;
}

/* Three-level craft ordering: ownership -> major family -> blueprint subtype. */
#shop .sh-c-four .sh-c-order-heading{
  display:flex;justify-content:space-between;align-items:center;
  gap:7px;min-width:0;padding:7px 10px 5px;
  border-top:1px solid #d6e1ee;background:#eaf2fb;
}
#shop .sh-c-four .sh-c-order-heading:first-child{border-top:0}
#shop .sh-c-four .sh-c-order-heading>b{font-size:11px;font-weight:850;color:#204b72}
#shop .sh-c-four .sh-c-order-heading>small{font-size:9px;font-weight:600;color:#73869b;text-align:right}
#shop .sh-c-four .sh-c-order-major{
  padding:5px 10px 4px;background:#f4f8fd;
  border-top:1px solid #e6ecf4;border-bottom:1px solid #e6ecf4;
  color:#526e89;font-size:10px;font-weight:800;
}
#shop .sh-c-four .sh-c-order-heading:has(+ .sh-c-order-major){border-bottom:0}
#shop .sh-c-four .sh-c-order-heading~.sh-c-order-heading{margin-top:4px}

/* Verified Korean blueprint reference metadata, shown only in expanded rows. */
#shop .sh-c-four .sh-c-official-extra {
  flex:1 1 100%;
  min-width:0;
  overflow-wrap:anywhere;
  color:#516c87;
  background:#f4f8fd;
  border-radius:5px;
  font-size:10px;
  line-height:1.5;
  padding:5px 8px;
}

/* Official Shop Titans item art: keep existing four-column density intact. */
#shop .sh-c-four .sh-c-item-layout{display:flex;align-items:center;gap:7px;min-width:0}
#shop .sh-c-four .sh-c-name-content{flex:1;min-width:0}
#shop .sh-c-four .sh-c-item-thumb{
  flex:0 0 36px;width:36px;height:36px;min-width:36px;min-height:36px;
  display:flex;align-items:center;justify-content:center;
  padding:1px;border-radius:7px;border:1px solid #cfdced!important;
  background:linear-gradient(145deg,#f5f8fd,#eaf0f9)!important;cursor:zoom-in;
}
#shop .sh-c-four .sh-c-item-thumb img{
  display:block;max-width:34px;max-height:34px;width:34px;height:34px;
  object-fit:contain;image-rendering:auto
}
#shop .sh-c-four .sh-c-item-thumb:hover{border-color:#6fa8da!important;box-shadow:0 0 0 2px #d7eafb}
#shop .sh-c-four .sh-c-title-line{min-width:0}
#shop .sh-c-four .sh-c-title-line>b{line-height:1.26}
#shop .sh-c-four .sh-c-name-content small{overflow:hidden;text-overflow:ellipsis}
#shop .sh-c-image-backdrop{
  position:fixed;inset:0;z-index:5200;display:flex;justify-content:center;
  align-items:center;background:rgba(12,27,46,.68);padding:14px;
}
#shop .sh-c-image-dialog{
  width:min(430px,calc(100vw - 28px));max-height:94vh;overflow-y:auto;
  border:1px solid #cbd8e9;border-radius:15px;
  box-shadow:0 18px 58px rgba(0,0,0,.27);background:#fff;color:#1e3650;padding:15px 17px 17px;
}
#shop .sh-c-image-title{display:flex;gap:9px;align-items:flex-start;justify-content:space-between}
#shop .sh-c-image-title>div{min-width:0}
#shop .sh-c-image-title strong{display:block;font-size:17px;line-height:1.4;overflow-wrap:anywhere}
#shop .sh-c-image-title small{display:block;font-size:11px;color:#6f839b;margin-top:3px}
#shop .sh-c-image-title button{min-width:30px;min-height:30px;padding:4px;border-radius:8px;cursor:pointer}
#shop .sh-c-image-hero{
  min-height:182px;display:flex;justify-content:center;align-items:center;margin:14px 0;
  border:1px solid #e0e8f3;border-radius:12px;
  background:radial-gradient(circle,#fbfdff 0%,#edf4fb 100%);
}
#shop .sh-c-image-hero img{width:160px;height:160px;max-width:75%;object-fit:contain}
#shop .sh-c-image-facts{display:grid;gap:8px;font-size:12px}
#shop .sh-c-image-facts>div{
  display:grid;grid-template-columns:76px minmax(0,1fr);gap:9px;
  padding-bottom:7px;border-bottom:1px solid #e9eff6;align-items:start;
}
#shop .sh-c-image-facts b{color:#637b94;font-weight:650}
#shop .sh-c-image-facts span{font-weight:650;color:#244562;overflow-wrap:anywhere}
#shop .sh-c-image-official{
  display:block;margin-top:13px;border-radius:8px;padding:9px 12px;
  border:1px solid #aac9e9;background:#eef6ff;color:#175e9b;
  font-size:12px;font-weight:750;text-align:center;text-decoration:none
}
#shop .sh-c-image-official:hover{background:#e2f0ff}
@media(max-width:500px){
  #shop .sh-c-four .sh-c-item-layout{gap:5px}
  #shop .sh-c-four .sh-c-item-thumb{flex-basis:30px;width:30px;height:30px;min-width:30px;min-height:30px}
  #shop .sh-c-four .sh-c-item-thumb img{width:28px;height:28px}
  #shop .sh-c-image-dialog{padding:12px}
}
