/* Approved UI24 Shipyard/Shop, integrated through the existing meta DOM.
   UI skins are supplied by ui-v25.css; no art loader, clock or save lives here. */
.v25-wallet { display:flex; align-items:stretch; justify-content:center; gap:8px; min-width:0; }
.v25-wallet .wallet-chip {
  flex:1 1 0; min-width:0; min-height:44px; padding:3px 6px;
  display:flex; align-items:center; justify-content:center; gap:7px;
  color:var(--v25-ink,#153f53); border:1px solid var(--v25-brass,#c69838);
  border-radius:10px; background:#fff6e3 var(--v25-paper,none) center/256px 256px;
  box-shadow:inset 0 1px #fffef0; font-size:18px; line-height:1.05;
}
.v25-wallet .wallet-chip .icon { flex:none; width:24px; height:24px; }
.v25-wallet .wallet-copy { display:flex; flex-direction:column; align-items:center; min-width:0; gap:1px; }
.v25-wallet .wallet-copy strong { font-size:19px; font-weight:400; line-height:1.02; font-variant-numeric:tabular-nums; }
.v25-wallet .wallet-label { font-size:10px; line-height:1.05; }

.v25-navigation {
  width:100%; max-width:none; height:84px; min-height:84px; margin:0;
  padding:0; display:grid; grid-template-columns:1fr 1.4fr 1fr; gap:8px;
  align-items:end; flex:none; position:relative;
}
.v25-navigation .meta-nav-button {
  width:100%; height:calc(100% - 10px); min-height:64px; min-width:0; margin:0;
  padding:3px 4px; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:3px; position:relative;
  border:solid transparent; border-width:9px 13px;
  border-image:var(--v25-secondary,linear-gradient(#fffaf0,#f6e9d1)) 40 52 fill / 9px 13px / 0 stretch;
  background:none; box-shadow:none; color:var(--v25-ink,#153f53);
  font-size:16px; line-height:1.05; text-shadow:none;
}
.v25-navigation .meta-nav-button .icon { width:24px; height:24px; flex:none; }
.v25-navigation .meta-nav-button>span { font-size:inherit; line-height:1.05; }
.v25-navigation .meta-nav-main {
  height:100%; min-height:74px; gap:1px;
  border-image-source:var(--v25-primary,var(--v25-button-bg,linear-gradient(#1b9ca3,#00666d)));
  color:#fff7e4; font-size:27px;
}
.v25-navigation .meta-nav-main .icon { width:28px; height:28px; }
.v25-navigation .meta-nav-main small { font-size:12px; line-height:1.1; letter-spacing:0; }
.v25-navigation .meta-nav-button.selected:not(.meta-nav-main) { color:var(--v25-teal,#07868b); }
.v25-navigation .meta-nav-button.selected:not(.meta-nav-main)::after {
  content:''; position:absolute; left:50%; bottom:3px; width:28px; height:2px;
  transform:translateX(-50%); background:var(--v25-teal,#07868b); border-radius:2px;
}

.v25-meta-overlay { padding:0; align-items:flex-end; justify-content:center; background:#153f5328; }
.v25-meta-overlay>.v25-navigation {
  position:fixed; left:3%; top:auto; right:auto; bottom:calc(var(--app-height) * .021);
  width:94%; max-width:none; height:clamp(74px,calc(var(--app-height) * .102),94px);
  min-height:74px; max-height:94px; margin:0; z-index:7;
}
.meta-window.v25-meta {
  --v25-meta-nav-space:calc(clamp(74px,calc(var(--app-height) * .102),94px) + var(--app-height) * .021 + 4px);
  width:min(440px,100%); max-width:100%; min-width:0; min-height:0; max-height:none;
  margin:0; padding:6px 12px 0; gap:6px; border:0; border-radius:0;
  background:none; color:var(--v25-ink,#153f53); box-shadow:none; overflow:hidden;
}
.meta-window.v25-meta::before {
  inset:0 0 var(--v25-meta-nav-space); border:solid transparent; border-width:14px;
  border-image:var(--v25-panel,linear-gradient(#fff9ee,#f8edda)) 46 fill / 14px / 0 stretch;
  border-radius:0; background:none; box-shadow:none;
}
.v25-meta .v25-meta-heading {
  display:grid; grid-template-columns:44px minmax(0,1fr) 44px;
  align-items:center; min-height:44px; height:44px; gap:4px;
}
.v25-meta .meta-heading h1 { margin:0; font-size:27px; line-height:1; text-shadow:none; color:var(--v25-ink,#153f53); }
.v25-meta .meta-heading .meta-close { width:44px; height:44px; min-width:44px; min-height:44px; padding:10px; }
.v25-meta .meta-heading .meta-close .icon { width:24px; height:24px; }
.v25-meta .meta-heading-spacer { width:44px; height:1px; }
.v25-meta>.v25-wallet { width:100%; min-height:44px; height:44px; gap:8px; }
.v25-meta>.v25-wallet .wallet-chip { min-height:44px; height:44px; padding:3px 7px; border-color:#b5aa8a; }
.v25-meta>.v25-wallet .wallet-copy strong { font-size:18px; }
.v25-meta>.v25-wallet .wallet-label { font-size:10px; }
.v25-meta-nav-space { min-height:0; height:var(--v25-meta-nav-space); flex:none; pointer-events:none; }

.meta-window.v25-shipyard {
  --v25-meta-preview:clamp(200px,calc(var(--app-height) * .305),258px);
  height:calc(var(--app-height) - 8px); margin:4px 0;
  display:grid; grid-template-columns:minmax(0,1fr);
  grid-template-rows:44px 44px var(--v25-meta-preview) minmax(0,1fr) minmax(66px,auto) var(--v25-meta-nav-space);
}
.v25-shipyard.classic-ships { --v25-meta-preview:clamp(170px,calc(var(--app-height) * .235),200px); }
.v25-shipyard .vessel-preview.workshop-scene {
  width:calc(100% + 24px); margin:0 -12px; min-height:0; height:100%; max-height:none;
  flex:none; border:0; border-image:none; border-radius:0; box-shadow:none;
}
.v25-shipyard .workshop-scene .preview-caption { font-size:10px; top:6px; left:18px; padding:3px 7px; }
.v25-shipyard .workshop-preview-reset { top:4px; right:16px; width:44px; height:44px; padding:11px; }
.v25-shipyard .workshop-scene .ship-art-status { font-size:13px; }
.v25-shipyard .workshop-drawer {
  width:100%; min-width:0; min-height:0; height:auto; max-height:none; flex:none;
  display:flex; flex-direction:column; gap:5px; padding:0; overflow:hidden;
}
.v25-shipyard .workshop-view-tabs { flex:none; width:100%; min-height:44px; height:44px; display:grid; grid-template-columns:1fr 1fr .85fr; gap:4px; }
.v25-shipyard .workshop-view-tab {
  min-width:0; min-height:44px; height:44px; padding:4px 7px; border:1px solid #c6b694;
  border-radius:10px; background:#fff6e3 var(--v25-paper,none) center/256px 256px;
  color:var(--v25-ink,#153f53); font-size:16px; line-height:1.05;
}
.v25-shipyard .workshop-view-tab.selected {
  color:#fff7e4; border-color:var(--v25-teal,#07868b);
  background:var(--v25-button-bg,var(--v25-primary,linear-gradient(#16979d,#006d75))) center/100% 100% no-repeat;
}
.v25-shipyard .workshop-classic-themes { flex:none; min-height:44px; height:44px; display:flex; gap:5px; }
.v25-shipyard .workshop-classic-themes .theme-chip { min-height:44px; padding:4px 3px; font-size:12px; }
.v25-shipyard .workshop-slot-strip.workshop-slot-grid {
  flex:none; width:100%; min-height:94px; height:94px; padding:0; overflow:visible;
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-template-rows:repeat(2,44px); gap:6px;
}
.shipyard-v7-screen.v25-shipyard .vessel-slot.workshop-slot {
  width:auto; min-width:0; min-height:44px; height:44px; padding:3px 2px; gap:1px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  border:1px solid #c6b694; border-radius:9px; background:#fff7e7 var(--v25-paper,none) center/256px 256px;
  color:var(--v25-ink,#153f53); box-shadow:none; font-size:11px; line-height:12px;
}
.v25-shipyard .workshop-slot .icon { width:20px; height:20px; flex:none; }
.v25-shipyard .workshop-slot.selected { color:#fff7e4; border-color:var(--v25-teal,#07868b); background:var(--v25-teal,#07868b); }
.shipyard-v7-screen.v25-shipyard .vessel-slot.workshop-slot.selected { color:#fff7e4; border-color:var(--v25-teal,#07868b); background:var(--v25-teal,#07868b); }
.v25-shipyard .workshop-slot.selected .ui-icon-action [fill]:not([fill="none"]) { fill:currentColor; }
.v25-shipyard .workshop-catalog-label { min-height:18px; height:18px; flex:none; padding:0 2px; font-size:14px; line-height:18px; }
.v25-shipyard .workshop-catalog-label small { font-size:10px; line-height:14px; color:var(--v25-muted,#647c80); }
.shipyard-v7-screen.v25-shipyard .part-grid.workshop-parts {
  width:100%; min-width:0; min-height:98px; height:98px; max-height:98px; flex:none;
  display:grid; grid-auto-flow:column; grid-template-columns:none; grid-auto-columns:calc((100% - 12px) / 3);
  grid-template-rows:96px; gap:6px; padding:0 1px 2px; overflow-x:auto; overflow-y:hidden;
  scroll-snap-type:x proximity; overscroll-behavior-x:contain; scrollbar-width:thin;
}
.shipyard-v7-screen.v25-shipyard .workshop-parts .part-card {
  width:100%; min-width:0; min-height:96px; height:96px; padding:5px; gap:2px;
  display:flex; flex:none; flex-direction:column; align-items:center; justify-content:center;
  border:1px solid #c6b694; border-radius:11px; background:#fff9ed var(--v25-paper,none) center/256px 256px;
  box-shadow:none; color:var(--v25-ink,#153f53); scroll-snap-align:center;
}
.v25-shipyard .workshop-parts .part-card.selected { background-color:#eef5e9; outline:2px solid var(--v25-teal,#07868b); outline-offset:-2px; }
.shipyard-v7-screen.v25-shipyard .workshop-parts .part-thumbnail { flex:none; width:100%; min-height:0; height:34px; max-height:34px; border:0; background:none; }
.v25-shipyard .workshop-parts .part-card>strong { width:100%; min-height:24px; font-size:13px; font-weight:400; line-height:13px; text-align:center; white-space:normal; overflow-wrap:normal; }
.shipyard-v7-screen.v25-shipyard .workshop-parts .part-card>.part-status.part-state {
  position:static; inset:auto; top:auto; right:auto; bottom:auto; left:auto;
  flex:none; min-width:0; width:max-content; max-width:100%; min-height:22px; height:22px;
  margin:0; padding:2px 6px; display:flex; align-items:center; justify-content:center; gap:3px;
  border:1px solid #d4c9ad; border-radius:10px; background:#eee6d6;
  font-size:10px; line-height:14px; white-space:nowrap; color:var(--v25-ink,#153f53);
}
.v25-shipyard .part-state .icon { width:12px; height:12px; flex:none; }
.shipyard-v7-screen.v25-shipyard .workshop-parts .part-card>.part-status.craftable-state { background:#fff5de; }
.shipyard-v7-screen.v25-shipyard .workshop-parts .part-card>.part-status.owned-state { color:#246f66; background:#e2eee0; }
.shipyard-v7-screen.v25-shipyard .workshop-parts .part-card>.part-status.locked-state { color:var(--v25-muted,#647c80); }
.v25-shipyard .part-cost { display:inline-flex; align-items:center; justify-content:center; gap:5px; flex-wrap:nowrap; font-variant-numeric:tabular-nums; }
.v25-shipyard .cost-unit { display:inline-flex; align-items:center; gap:3px; white-space:nowrap; }
.shipyard-v7-screen.v25-shipyard .part-state .part-cost { gap:3px; font-size:11px!important; }
.v25-shipyard .cost-plus { font-size:10px; opacity:.65; }
.shipyard-v7-screen.v25-shipyard .part-grid.workshop-parts.workshop-set-list { min-height:174px; height:174px; max-height:174px; grid-template-rows:172px; }
.shipyard-v7-screen.v25-shipyard .workshop-set-list .part-card { min-height:172px; height:172px; }
.shipyard-v7-screen.v25-shipyard .workshop-set-list .workshop-set-thumbnail { flex:none; width:100%; min-height:0; height:88px; max-height:88px; }
.v25-shipyard .workshop-set-list .part-card>strong { min-height:17px; line-height:17px; font-size:14px; }
.v25-shipyard .set-owned-count { font-size:10px; line-height:12px; color:var(--v25-muted,#647c80); }
.v25-shipyard .part-selection {
  width:100%; min-width:0; min-height:66px; height:auto; margin:0; padding:3px 0 0;
  display:flex; flex-direction:column; align-items:stretch; justify-content:center; gap:3px;
  border:0; box-shadow:none; background:none;
}
.v25-shipyard .part-selection>div { min-width:0; display:flex; flex-direction:row; justify-content:center; align-items:center; gap:7px; font-size:11px; line-height:14px; }
.v25-shipyard .part-selection>div>strong { min-width:0; max-width:70%; font-size:13px; line-height:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.v25-shipyard .part-selection>div>.part-cost,.v25-shipyard .part-selection>div>.selection-owned { display:none; }
.v25-shipyard .part-selection.has-art-error>div>.part-cost { display:inline-flex; }
.v25-shipyard .selected-only-note { min-width:0; max-width:46%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:10px; line-height:12px; }
.v25-shipyard .v25-workshop-action {
  width:min(264px,100%); min-height:52px; height:52px; align-self:center;
  display:flex; flex-direction:column; justify-content:center; gap:0; padding:2px 7px;
}
.v25-shipyard .v25-workshop-action.has-price { min-height:56px; height:56px; }
.v25-shipyard .workshop-action-label { display:flex; align-items:center; justify-content:center; gap:6px; font-size:18px; line-height:20px; }
.v25-shipyard .workshop-action-label .icon { width:20px; height:20px; }
.v25-shipyard .workshop-action-price { display:flex; justify-content:center; font-size:14px; line-height:17px; }
.v25-shipyard .workshop-action-price .icon { width:17px; height:17px; }
.v25-shipyard .part-selection>.tool:not(.v25-workshop-action) { align-self:center; width:264px; max-width:100%; }

.meta-window.v25-shop {
  height:calc(var(--app-height) - 88px); margin:0; padding-top:8px;
  display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:44px 46px 44px minmax(0,1fr) var(--v25-meta-nav-space);
}
.v25-shop .meta-heading h1 { font-size:29px; }
.v25-shop .shop-tabs { min-height:44px; height:44px; display:grid; grid-template-columns:1.1fr 1fr 1fr; gap:4px; }
.v25-shop .shop-tabs .theme-chip { min-height:44px; padding:4px 3px; font-size:14px; line-height:1.05; border-radius:10px; border-color:#bca77b; background:#fff6e3 var(--v25-paper,none) center/256px 256px; color:var(--v25-ink,#153f53); }
.v25-shop .shop-tabs .theme-chip.selected { background:var(--v25-button-bg,var(--v25-primary,linear-gradient(#15969e,#006b72))) center/100% 100% no-repeat; color:#fff7e4; }
.v25-shop .shop-scroll { min-height:0; height:auto; flex:none; padding:3px 1px 8px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.v25-shop .store-card {
  min-width:0; margin:0 0 10px; padding:10px; gap:9px;
  border:1px solid #c6ab72; border-radius:14px;
  background:#fff8e9 var(--v25-paper,none) center/256px 256px; box-shadow:none;
}
.v25-shop .v25-booster-card { display:grid; min-height:116px; grid-template-columns:52px minmax(0,1fr) 112px; align-items:center; }
.v25-shop .product-emblem { width:52px; height:52px; min-width:0; border:1px solid #d5b969; border-radius:50%; background:#fff1c6; color:var(--v25-ink,#153f53); }
.v25-shop .product-emblem .icon { width:34px; height:34px; }
.v25-shop .store-copy { min-width:0; }
.v25-shop .store-copy h3 { margin:0 0 4px; font-size:18px; line-height:1.12; font-weight:400; color:var(--v25-ink,#153f53); }
.v25-shop .store-copy p { margin:0; font-size:12px; line-height:1.25; color:var(--v25-ink,#153f53); }
.v25-shop .store-copy small { font-size:10px; line-height:1.2; color:var(--v25-muted,#647c80); }
.v25-shop .pack-count { white-space:nowrap; }
.v25-shop .booster-owned { margin-top:5px; display:block; font-size:9px; line-height:14px; color:var(--v25-muted,#647c80); white-space:nowrap; }
.v25-shop .owned-badge { margin:0 2px; padding:1px 5px; min-width:18px; font-size:11px; line-height:12px; text-align:center; }
.v25-shop .booster-buy-row { grid-column:auto; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:44px 44px; gap:5px; margin:0; }
.v25-shop .store-card .tool { min-width:0; min-height:44px; height:44px; margin:0; padding:1px 3px; gap:3px; font-size:12px; line-height:14px; }
.v25-shop .store-card .tool .icon { width:17px; height:17px; flex:none; }
.v25-shop .booster-buy-row>.tool.primary { font-size:15px; line-height:16px; }
.v25-shop .booster-buy-row>.tool:not(.primary) { font-size:11px; }
.v25-shop .v25-supply-card { display:grid; grid-template-columns:52px minmax(0,1fr) 112px; min-height:100px; }
.v25-shop .v25-supply-card .store-copy,.v25-shop .v25-supply-card>.tool { grid-column:auto; }
.v25-shop .v25-supply-card .store-copy h3 { font-size:16px; }
.v25-shop .v25-supply-card .store-copy p { font-size:13px; }
.v25-shop .v25-supply-card>.tool { font-size:12px; height:auto; min-height:44px; }
.v25-shop .v25-supply-card .supply-limit { grid-column:1/-1; font-size:10px; line-height:13px; margin:0; }
.v25-shop .product-card { display:grid; grid-template-columns:64px minmax(0,1fr); min-height:126px; }
.v25-shop .product-card .product-emblem { justify-self:center; }
.v25-shop .product-card>.tool { grid-column:1/-1; width:100%; }
.v25-shop .product-card:has(.set-thumbnail) { grid-template-columns:100px minmax(0,1fr); }
.v25-shop .product-card>.set-thumbnail,.v25-shop .product-card>.workshop-set-thumbnail { width:100px; height:88px; max-height:88px; }
.v25-shop .exchange-card { display:grid; grid-template-columns:42px minmax(0,1fr) 118px; min-height:78px; }
.v25-shop .exchange-card .product-emblem { width:40px; height:40px; }
.v25-shop .exchange-card .product-emblem .icon { width:26px; height:26px; }
.v25-shop .exchange-card .store-copy h3 { font-size:16px; }
.v25-shop .exchange-card>.tool { font-size:11px; }
.v25-shop .shop-section-title { margin:14px 3px 9px; font-size:20px; color:var(--v25-ink,#153f53); }
.v25-shop .shop-explainer,.v25-shop .store-availability { font-size:12px; line-height:1.3; color:var(--v25-muted,#647c80); }
.v25-shop .shop-support { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.v25-shop .shop-support>.tool { min-height:44px; height:auto; padding:1px 3px; gap:4px; font-size:10px; line-height:12px; }
.v25-shop .shop-support>.tool .icon { flex:none; width:18px; height:18px; }

@media(max-width:350px) {
  .v25-wallet { gap:5px; }
  .v25-wallet .wallet-chip { gap:4px; padding:3px; }
  .v25-wallet .wallet-chip .icon { width:20px; height:20px; }
  .v25-wallet .wallet-copy strong { font-size:17px; }
  .v25-wallet .wallet-label { font-size:9px; }
  .v25-navigation { gap:5px; }
  .v25-navigation .meta-nav-button { font-size:13px; padding-left:2px; padding-right:2px; }
  .v25-navigation .meta-nav-main { font-size:23px; }
  .v25-meta .meta-heading h1 { font-size:24px; }
  .v25-meta>.v25-wallet { gap:5px; }
  .v25-meta>.v25-wallet .wallet-chip { padding:3px; gap:4px; }
  .v25-shipyard .workshop-view-tab { font-size:14px; }
  .v25-shipyard .workshop-slot { font-size:10px; }
  .v25-shipyard .workshop-parts .part-card>strong { font-size:12px; }
  .shipyard-v7-screen.v25-shipyard .workshop-parts .part-card>.part-status.part-state { padding:2px 3px; font-size:9px; }
  .shipyard-v7-screen.v25-shipyard .part-state .part-cost { font-size:10px!important; gap:2px; }
  .v25-shipyard .part-state .icon { width:11px; height:11px; }
  .v25-shop .shop-tabs .theme-chip { font-size:12px; }
  .v25-shop .v25-booster-card,.v25-shop .v25-supply-card { grid-template-columns:42px minmax(0,1fr) 96px; padding:8px; gap:6px; }
  .v25-shop .product-emblem { width:42px; height:42px; }
  .v25-shop .product-emblem .icon { width:29px; height:29px; }
  .v25-shop .store-copy h3 { font-size:16px; }
  .v25-shop .store-copy p { font-size:11px; }
  .v25-shop .booster-owned { font-size:8px; }
  .v25-shop .booster-buy-row>.tool.primary { font-size:13px; }
  .v25-shop .booster-buy-row>.tool:not(.primary) { font-size:10px; }
  .v25-shop .exchange-card { grid-template-columns:36px minmax(0,1fr) 106px; gap:6px; padding:8px; }
}
@media(max-height:740px) {
  .meta-window.v25-shipyard {
    display:flex; flex-direction:column; justify-content:flex-start;
    overflow-y:auto; overscroll-behavior:contain; padding-bottom:0;
  }
  .v25-shipyard .vessel-preview.workshop-scene { flex:none; min-height:204px; height:204px; }
  .v25-shipyard.classic-ships .vessel-preview.workshop-scene { min-height:184px; height:184px; }
  .v25-shipyard .workshop-drawer { flex:none; height:auto; overflow:visible; }
  .v25-shipyard .part-selection { flex:none; min-height:70px; }
  .v25-meta-nav-space { flex:none; }
  .meta-window.v25-shop { height:calc(var(--app-height) - 72px); }
}
