#serpent-cabin-overlay[hidden], #serpent-toy-toast[hidden], #serpent-cabin-open[hidden], #serpent-cabin-open-prep[hidden], #serpent-cabin-open-pc[hidden] { display: none !important; }
#serpent-cabin-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 12px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left)); box-sizing: border-box; background: #080e13a8; color: var(--theme-ink, #eee4ce); font: 12px/1.45 'Microsoft YaHei', system-ui, sans-serif; touch-action: manipulation; }
#serpent-cabin-dialog { width: min(760px, 100%); height: min(410px, 100%); display: flex; flex-direction: column; background: var(--theme-surface, #14232b); border: 1px solid var(--theme-edge, #6b7d80); padding: 12px 16px; box-sizing: border-box; }
#serpent-cabin-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
#serpent-cabin-dialog h2, #serpent-cabin-dialog h3, #serpent-cabin-dialog h4, #serpent-cabin-dialog p { margin: 0; }
#serpent-cabin-dialog h2 { font-size: 18px; color: var(--theme-gold, #edca7c); }
#serpent-cabin-dialog header p { color: var(--theme-muted, #bdc9cc); font-size: 11px; margin-top: 2px; font-variant-numeric: tabular-nums; }
#serpent-cabin-dialog button, #serpent-cabin-open-pc { min-height: 44px; border: 1px solid var(--theme-edge, #6b7d80); border-radius: 3px; color: inherit; background: var(--theme-raised, #20323a); cursor: pointer; font: inherit; }
#serpent-cabin-dialog button:focus-visible, #serpent-cabin-open-pc:focus-visible { outline: 2px solid #80d7ff; outline-offset: 2px; }
#serpent-cabin-dialog button:hover:not(:disabled) { border-color: var(--theme-gold, #edca7c); }
#serpent-cabin-dialog button.selected { border-color: var(--theme-gold, #edca7c); background: #374339; }
#serpent-cabin-dialog button:disabled { opacity: .55; cursor: default; }
#serpent-cabin-close { padding: 4px 16px; flex-shrink: 0; }
.serpent-cabin-actions { display: flex; gap: 6px; }
#serpent-test-supply { padding: 4px 8px; }
#serpent-test-supply[hidden] { display: none; }
#serpent-cabin-dialog button, #serpent-cabin-open, #serpent-cabin-open-prep, #serpent-cabin-open-pc { -webkit-tap-highlight-color: transparent; }
.serpent-cabin-body { display: grid; grid-template-columns: minmax(0, 1fr) 226px; gap: 16px; flex: 1; min-height: 0; }
.serpent-cabin-body h3 { font-size: 13px; padding-bottom: 8px; }
.serpent-cabin-body h3 span { font-size: 11px; font-weight: normal; color: var(--theme-muted, #bdc9cc); margin-left: 6px; font-variant-numeric: tabular-nums; }
.serpent-stock { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
#serpent-toy-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 6px; overflow-y: auto; min-height: 0; padding: 2px 4px 3px 2px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #6b7d80 #14232b; }
#serpent-toy-list button { display: flex; align-items: center; gap: 6px; text-align: left; padding: 5px; min-width: 0; }
#serpent-toy-list img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
#serpent-toy-list button > span { min-width: 0; }
#serpent-toy-list b { display: block; font-size: 11px; font-weight: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#serpent-toy-list small { display: block; font-size: 10px; color: var(--theme-muted, #bdc9cc); white-space: nowrap; font-variant-numeric: tabular-nums; }
#serpent-toy-list .unowned img { opacity: .55; }
.serpent-assembly { display: flex; flex-direction: column; min-height: 0; }
#serpent-toy-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; flex-shrink: 0; }
#serpent-toy-slots button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; height: 56px; padding: 3px; min-width: 0; }
#serpent-toy-slots img { width: 26px; height: 26px; object-fit: contain; }
#serpent-toy-slots span { font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#serpent-toy-detail { flex: 1; min-height: 0; overflow-y: auto; margin: 8px 0; scrollbar-width: thin; scrollbar-color: #6b7d80 #14232b; overscroll-behavior: contain; }
#serpent-toy-detail h4 { font-size: 13px; color: var(--theme-gold, #edca7c); padding-bottom: 4px; }
#serpent-toy-description { white-space: pre-line; color: var(--theme-muted, #bdc9cc); }
#serpent-toy-effect { margin-top: 8px !important; color: var(--theme-gold, #edca7c); font-size: 11px; }
#serpent-toy-list .serpent-toy-trait { font-size: 10px; }
#serpent-cabin-dialog footer { display: flex; flex-wrap: wrap; gap: 2px 12px; padding-top: 8px; font-size: 10px; color: var(--theme-muted, #bdc9cc); }
#serpent-cabin-status { color: var(--theme-gold, #edca7c); }
#serpent-toy-toast { position: fixed; z-index: 2100; top: 70px; left: 50%; transform: translateX(-50%); padding: 8px 14px; background: #14232bf2; color: #f3dfa8; font: 13px/1.4 'Microsoft YaHei', system-ui, sans-serif; pointer-events: none; }
#serpent-cabin-open-pc { position: fixed; top: 220px; left: 16px; z-index: 65; color: #eee4ce; padding: 4px 12px; }
body.mobile-layout #serpent-cabin-open-pc { display: none; }
body.serpent-cabin-open #combat-quick-access { visibility: hidden; }
@media (max-height: 360px) {
  #serpent-cabin-dialog { padding: 8px 12px; }
  #serpent-cabin-dialog header { padding-bottom: 6px; }
  .serpent-cabin-body { grid-template-columns: minmax(0, 1fr) 210px; gap: 10px; }
  #serpent-toy-slots button { height: 46px; }
  #serpent-toy-slots img { width: 20px; height: 20px; }
  #serpent-toy-detail { margin: 5px 0; }
  #serpent-cabin-dialog footer { padding-top: 5px; }
}
